Hey guys i am having some trouble with nesting one selection structure
within another selection structure. At the moment i am unclear what
selection structures are and just need a simple example of a selection
structure within another selection structure. I am supposed to use
function definitions with parameters to validate a form. my code for
what i have done so far is as follows(cropped ):
function mainFunction() {
var dateFormat = (document.dateF ormat.date.valu e + " " +
document.dateFo rmat.month.valu e + ", " +
document.dateFo rmat.year.value );
window.alert("T he date is " + dateFormat);}
return; }
function checkDate( ) {
if (0<parseInt(doc ument.dateForma t.date.value) &&
parseInt(docume nt.dateFormat.d ate.value)<=31) {
return true;}
else {window.alert(" Problem with the date");
return false;} }
Basically how can i change the above checkDate function in include a
selection structure nested within another selection
structure.Event ually i will have another 2 functions which will b used
to validate the year and month the user enters. Your help would be
great :)
Have a nice day