199,114 Archived Topics
Remove Filter ![]() | |
this is my javascript for validation of a form .It works perfectly <script type="text/javascript"> function validateForm() { var x=document.forms["contacts-form"]["email"].value; var atpos=x.indexOf("@"); var dotpos=x.lastIndexOf("."); if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length) { alert("Not a valid e-mail address"); return false; } var x=document.forms["contacts-form"]["name"].value; if (x==null || x==""||x=="Name:") { alert("First name must be filled … | |
What we have done was : Specifying valid FTP remote server name, a username and a password if password required in their relevant textboxes on the form then we click on connect, we notice that the TreeView control is filled with main directories while ListBox control is filled with main … | |
I have an Attendence form the form is like this the employee should select there number then click on sign in button it should save the date of the day , the time in , the number of the employee and display tha data in the gridview and disable the … | |
Hi guys, I have a maybe simple question, but I'm wonder how they do this: [http://www.blacknegative.com/#!/adisseo/](http://www.blacknegative.com/#!/adisseo/) background image scale perfect in all screen resolution (even 2560x1440 or 800x1280), and the background picture is only ~1000 x 1000 pixels. I make similar effect with <img src=""> and some javascript, but they … | |
guys i'm having a really big problem right now..im trying to make a conditional statement using php but im having an logical error or syntax error..im trying to compute for the car rate but im not getting a correct output e.g i have a list of car which are "Small … | |
![]() | Ideally I would like to take a value entered from an Option List and use it in a linked program before the form is submitted, The value would be used in a select search so that the operator then knows what to format of data to enter in the next … ![]() |
Hello! I have been trying to figure out why an upload script doesn't seem to work like it should but I couldn't understand why so maybe somebody here can help me out a bit please. Here is the function: function uploadFile($conn,$newsid,$table_name,$linkImg,$align) { global $msg,$maxSize; if ( $_FILES['userfile']['size']!=0 && $_FILES['userfile']['size']<($maxSize*1000) && … | |
I am attempting to create a live search using php/javascript to read from an XML file of student names, as the user types a search it shows results live Any tutorials, hints or tips? All my attempts have been futile | |
Hello everyone.I am new to vb.net 2008 and i am in trouble.The problem for me is that i am making a windows form for a company and i am in a mess in getting my database connection to my datagridview by clicking a button and my data should been shown … | |
hello ! i am new in c# , i have images in my mssql table and i want to show those images in the datagridview , i add a column type image , but i am not able to show images in it , please help me in this . … | |
I have another problem that is driving me crazy. I separated sections on my page with normal anchors, but when I click, they take me to the part of the page where the div is, and I want to keep focus on the top part of the page, I mean, … | |
What is the difference between import static java.lang.System; and import static java.lang.System.*; | |
When we signout the form How can i disabling back button and, not only disabling back button but also delete history from browser. Suppose i used <script language="javascript" > javascript: window.history.forward(1); </script> to disable back button , its working. when i go to back list and click previous histories it … | |
Hi :) I have a caple of questions: 1) How can i create a global function or a global class that will be available to the entire project ? 2) I want to create derived class from the DataGridView class and change it so it will fit to my needs, … | |
I'm beginning android development and was going through some guides in which I tumbled across this piece of code : myEditText.setOnKeyListener (new OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { if (event.getAction() == KeyEvent.ACTION_DOWN) if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) { todoItems.add(0, myEditText.getText().toString()); aa.notifyDataSetChanged(); myEditText.setText(“”); return true; } return … | |
hello, I want to open a new connection in main() instead of openning it each I need to read or save something on the database. I opened the connection in main() but the problem is how to use it in the form? Do I have to pass it as a … | |
Hi all, I know that one advantage of method overloading is that the implementation can be overridden for the same method name, but wanted to know how is that going to be an advantage for us. All the links explain how to do it, and not why to do it … | |
AM I doing the right syntax for this parameter? da.SelectCommand = new SqlCommand("SELECT Member.MemberID, Member.Name , Member.Surname, Rentals.RentalID FROM Member,Rentals WHERE Member.MemberID = (@MemberID) Rentals.MemberID", c); da.SelectCommand.Parameters.Add("MemberID", SqlDbType.VarChar).Value = txtID.Text; ds.Clear(); da.Fill(ds); dtgv1.DataSource = ds; It is giving me an error "Incorrect syntax near 'Rentals'." Thanks | |
I am trying to use the Sqlcecmd (command line tool for compact DB) but all it seems to do is open and close straight away... Any ideas? | |
I am getting an error that is"Invalid object name 't_Images' " here is my code: SqlConnection s = new SqlConnection(con); s.Open(); byte[] data; using (System.IO.MemoryStream stream = new System.IO.MemoryStream()) { video.Save(stream, System.Drawing.Imaging.ImageFormat.Bmp); data = stream.ToArray(); } SqlCommand s_Com = new SqlCommand("INSERT INTO t_Images (Image_ID,Image)"+" VALUES (1,@data) ; ", s); SqlParameter … | |
Hello! I'm searching for a UML tool that can comprehensively 3D visualize a big (class) diagram. Something like a crossover between Google Sketchup and a proper modelling tool - or a tool which uses an XMI export as a base for its 3D visualization. Ideally it would also provide an … | |
private void btnSend_Click_1(object sender, EventArgs e) { To = txtPhoneNumber.Text.Trim() + cboCarrier.SelectedItem.ToString().Trim(); From = txtSender.Text.Trim(); Subject = txtSubject.Text.Trim(); MailServer = txtMailServer.Text.Trim(); Msg = txtMessage.Text.Trim(); try { MailMessage message = new MailMessage(From, To, Subject, Msg); SmtpClient mySmtpClient = new SmtpClient(MailServer); mySmtpClient.UseDefaultCredentials = true; mySmtpClient.Send(message); MessageBox.Show("Message has been sent to " + … | |
Hi to all first to say I am beginner in programming so please dont mind for mistakes I could write here :) I have this problem, on the form I use one combobox with Data Bound items, Data source, Display member & Value member. Besides this combobox I have textbox … | |
public void findHighestNumber(int timesToLoop) { int highNumber = 0; int counter = 0; int userInput = 0; while(counter < timesToLoop) { System.out.print("Enter a whole number: "); userInput = reader.getInput(); counter++; System.out.println(""); } if(userInput > highNumber) { highNumber = userInput; } if(counter == timesToLoop) { System.out.println("Finished looping! Highest is " +highNumber); … | |
Hey guys, I'm trying to install my own version of python on an HPC without root access so I can use my own packages. So far I am banging my head against the wall and getting nowhere. I actually had my own version of python, numpy, ipython and a couple … | |
For a shell script used to automatically generate c++ code files, I have to split certain names apart for them to be formatted. I split them at a capital letter, but I do not want to split if there are multiple capital letters in sequence. For example: I want this … | |
I have a problem. 1>------ Build started: Project: SDL Test, Configuration: Debug Win32 ------ 1> playa.cpp 1> main.cpp 1> Generating Code... 1>c:\users\will\documents\visual studio 2010\projects\sdl test\sdl test\main.cpp(43): warning C4715: 'load_image' : not all control paths return a value 1>c:\users\will\documents\visual studio 2010\projects\sdl test\sdl test\main.cpp(43): warning C4715: 'load_image' : not all control paths … | |
Hi, For some reason form submit is not working properly while I am using Ajax. I want the result to be displayed on the same page. I am using Ajax for this, but when I submit the form, only text is being displayed rather than the actual value. This is … | |
![]() | Hello everyone, I'm writing an application with a ListView in C# WPF. I was wondering if I was missing a reference of something, because I get this error all the time: `'System.Windows.Controls.ListView' does not contain a definition for 'Columns' and no extension method 'Columns' accepting a first argument of type … ![]() |
Hello: I would like to get confirmation from user, if a particular checkbox on form is not checked, whether they want to submit the form without checking this box. I have written the following, but need help with it --missing something. <script type="text/javascript"> function taxable(){ if (document.processEstimate.tax.checked == 0) { … | |
I am building this database : http://imageshack.us/photo/my-images/217/diagramg.png/ I have a difficilty Regarding Renting. Because in this system one can order either DVD Or Game. Therefore how am i going to link the Game or/and the Dvd to the Rent table ? Currently it does not work due to the fact … | |
Hi, I tried to do like below, but its not printing the expected one. Plz suggest to proceed further. OUTPUT: Enter the string: abc Entered string is : NULL void main() { char *a; printf("Enter the string: "); scanf("%s",&a); printf("\nEntered string is :%s", a); getch(); } | |
In XP, I was able to show the File Properties dialog from c# code. The essential bits are shown below; This no longer works in Windows 7 64 bit. Surely it must be implemented more simply now? I have searched the internet for a replacement method without success. I noticed … | |
I am trying to store the permutations generated by the recursive permutation function so that I can use them in main; however, I cannot figure how to get them to store correctly. I.E. when I run this function with a string AB, inside the recursive AB and BA gets printed … | |
Hello, I have a simple xml file online, all I want to do is read 2 things, the song name and song artist. I searched for a simple php script that does that with no luck. I really appreciate the help. This is what the xml file looks like <stwcue … | |
I have looked through a few SQL hierarchy tutorials, but none of them made much sense for my application. Perhaps I am just not understanding them correctly. I'm writing a C# ASP.NET application and I would like to create a tree view hierarchy from SQL data. This is how the … | |
What is the difference between java and java script ? No Google Use :) | |
I am learning jQuery from Head First jQuery. But first they have asked me to install Apache, PHP and MySQL(in that order). Apache is successful. Up and running. Version 2.2.22 of Apache for Windows XP. I downloaded php-5.2.17-Win32-VC6-x86.msi(file name) and installed. Successful. So just to make sure php was working, … | |
hi, i want to one simple register form. on my form user name , age , sex , email address, state , city , country these are the fields i need to register for every user.. my pbm is i need to check user name into databse table, **if user … | |
protected void Button1_Click1(object sender, EventArgs e) { string sql = "INSERT INTO user(CustomerName,Age,Sex,Email address,State,City,Country) VALUES (@Val1,@Val2,@val3,@val4,@val5,@val6,@val7,@val8,@val9,@val10)"; try { SqlConn.Open(); SqlCommand cmd = new SqlCommand(sql, SqlConn); cmd.Parameters.AddWithValue("@Val1", txtcname.Text.ToString().Trim()); cmd.Parameters.AddWithValue("@Val2", txtAge.Text.ToString().Trim()); cmd.Parameters.AddWithValue("@Val3", txtsex.Text.ToString().Trim()); cmd.Parameters.AddWithValue("@Val4", txtEmail.Text.ToString().Trim()); cmd.Parameters.AddWithValue("@Val5", txtaddress.Text.ToString().Trim()); cmd.Parameters.AddWithValue("@val6", DrpState.SelectedItem.ToString().Trim()); cmd.Parameters.AddWithValue("@Val7", DrpCity.SelectedItem.ToString().Trim()); cmd.Parameters.AddWithValue("@Val7", DrpCountry.SelectedItem.ToString().Trim()); cmd.CommandType = CommandType.Text; cmd.ExecuteNonQuery(); } catch (System.Data.SqlClient.SqlException ex) { … | |
So I was trying out SDL_gfx lib and tryed using the rotozoomSurface() [Click Here](http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__rotozoom_8h.html#a3cb0c11d5edc929579c807dc7612348c) which should've rotated my surface at runtime, but it seems that whenever I do that my surface turns invisible. It doesn't matter if I predefine the rotation or use it at runtime, the same happens, I've … | |
Hi, For some reason form submit is not working properly while I am using Ajax. I want the result to be displayed on the same page. I am using Ajax for this, but when I submit the form, only text is being displayed rather than the actual value. This is … | |
` connectionString="Data Source=########;Initial Catalog=DowntimeD51;Persist Security Info=True;User ID=#######;Password=########;Connection Timeout=120;Encrypt=False;TrustServerCertificate=False;Network Library=dbmssocn"` I have the above connection string in a vb windows application , This is part of my app config file. I then have a number of table adapters for connecting my business logic to the database , One of the queries … | |
**Pyramid Pattern** Dear Listers, I am in the process of wrting a java code that prints the following pattern 123454321 1234*4321 123***321 12*****21 1*******1 This is the code that I have written as public class Pyramid { public static void main(String[] args) { int j; for (int i=1; i<5; i++) … | |
hi all, i am building a squared pyramid calculator and writing all the code from scratch, but I seem to have run into my first problem though. i am giving the user a welcome message and then giving them a dropdown menu asking them what they want to "adjust" for … | |
Hi, Ever had an application that you want to store user specific settings on? e.g. login name or Form background colours, User specifc DSN connections etc. So the next time they run the app the information is there for them? This can be achieved in VB.net with just a few … | |
Can Anyone please take a loo at this code and tell me whats wrong??? Sorry.................for the indentation is screwed :( import java.applet.*; import java.awt.*; import java.net.*; import java.awt.event.*; import java.util.*; public class Pritish extends Applet implements ActionListener implements Runnable { Thread t,t1; public void init() { String link1 = "yahoo"; … | |
Hello, I have a simple form. <form action="" method="post"> <label for="user">Name</label> <input type="text" name="user" id="user" /> </br> <label for="title">Title</label> <input type="text" name="title" id="title" /> <textarea name="body" rows="20" cols="60"></textarea> <input type="submit" value="Add Post" /> </form> I am trying to insert this to a table, which I am able to do. But … | |
can you help me how to select from multiple tables. so far this is my code how do i Dim dr As OleDbDataReader Dim dc As New OleDbCommand dc.Connection = conn dc.CommandText = "SELECT * FROM tblClient, tblLoan WHERE ClientNo = '" & ClientNo & "'" dr = dc.ExecuteReader If … | |
Hi, I am using php and html and i am trying to make two buttons: - Print button: that print a specific picture (not the whole page) - Download button: which will display the save as window to save a picture. Do you know if this is possible and how, … |
The End.