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




Have Programming Question? Ask it here!
 
 
 


Jeevan kumar
javascript
1 Answer(s)      3 years and 9 months ago
Posted in : JSP-Interview Questions


please tell me sir,this query not validating correctly..whats wrong in this query?

<HTML> <HEAD> <TITLE>validate

<Script language = JavaScript>

function validate(theForm) {

var why="";

why += checkDropdown(theForm.choose.selectedIndex);

why += checkRadio(theForm.radios);

if (why != "") { alert(why); return false; } return true; }

function checkDropdown(choice) { var error = ""; if (choice == 0) { error = "You didn't choose an option from the drop-down list.\n"; } return error; }

function checkRadio(checkvalue) { var error = "";

for (i=0, n=theForm.radios.length; i

if (!(checkvalue)) { error = "Please check a radio button.\n"; } return error; } <BODY>

Male Female


Advertisement
View Answers

November 17, 2010 at 11:40 AM


Hello Friend,

Please go through the following link:

Visit Here

Thanks



Related Tutorials/Questions & Answers:
 

 

 

DMCA.com