i have a simple html page with a combobox and a label and submit button in a html form .. i need to: 1. check whether both combobox and text have been input .if yes then submit. 2.display these values in another page as text can any one please help me with the code?
In the php file (that gets the variables form the form) create some function for checking those variables. example if(empty($checkbox1) || empty($checkbox2)) /*Prompt error for empty checkboxes*/ else /*do whatever you want*/
use the following javascript to validate on client side: <script language="javascript"> fnSubmit() { var combobox1 = document.getElementById("ID OF YOUR combobox"); var text1 = document.getElementById("ID OF YOUR textbox"); if (combobox1.value !="" && text1.value !="") { return true;// submits the form } else { alert("please fill all required fienld"); return false; } } </script> Code (markup): please rep me if you like this.
thank you ... i wanted to get the variables from the first html form in the second one .... i sent the data using get method ... i want to display the values as links in the next page .. which links to other websites.... can any one hepl me with that..