Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet combox validation javascript code

Have Programming Question? Ask it here!
 
 
 


suved
combox validation javascript code
1 Answer(s)      5 years and 9 months ago
Posted in : JSP-Servlet



Advertisement
View Answers

January 31, 2009 at 6:15 AM


Hi
This is the source code of combobox validation in javascript
.................................................................
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>ComboBox Validation</TITLE>

<script Language="JavaScript">
function validateR(){
var selectedCombobox=(comboForm.technology.value);
if (selectedCombobox=="-1") {
alert("Please Select Technology");
return false;
}
return true;
}
</script>


</HEAD>

<BODY>
<form name="comboForm">
<select name="technology">
<option value="-1">Select</option>
<option value="JSP">Java Server Pages</option>
<option value="Servlet">Servlet</option>
<option value="PHP">PHP</option>
<option value="ASP">ASP</option>
</select>

<input type="submit" value="submit" onclick="return validateR();">
</form>

</BODY>
</HTML>

For More Details Please Click: http://www.roseindia.net/javascript/combo-box-validation.shtml

Thanks...


Related Tutorials/Questions & Answers:
 

 

 

DMCA.com