Click to See Complete Forum and Search --> : on submit problem


w33man
02-21-2003, 04:14 AM
error 'document.forms.0.submitted' is null or not an object:confused:

jwalin
02-21-2003, 04:23 AM
Hi Friends,

Write this and tried

document.form[0].submit()

jwalin

w33man
02-21-2003, 04:39 AM
/* this code calls the JS Header code for validation*/
temp1 = "";
if (isFieldEmpty(document.forms[0].Category,"Please select the category.","radio")) return false;
if (isFieldEmpty(document.forms[0].Name,"Please enter the name of the club.","text")) return false;
if (isFieldEmpty(document.forms[0].ContactName,"Please enter a Contact Name.","text")) return false;
if (isFieldEmpty(document.forms[0].ContAddress,"Please enter the Contact Address.","text")) return false;
if (isFieldEmpty(document.forms[0].ContPostCode,"Please enter the Contact Post Code.","text")) return false;
if (isFieldEmpty(document.forms[0].ContactTel,"Please enter a Contact Telephone No.","text")) return false;
if (isFieldEmpty(document.forms[0].Venue,"Please enter the name of a venue.","text")) return false;
if (isFieldEmpty(document.forms[0].VenueAddress,"Please enter the address of the venue.","text")) return false;
for ( i = 0; i < document.forms[0].LocalArea.options.length; i++ ) {
if ( document.forms[0].LocalArea.options[i].selected ) temp1 += document.forms[0].LocalArea.options[i].text ;
}
//if (temp1= "Please select Town") return false;
if (temp1== "Please select Town") {
alert("Please select Town");
document.forms[0].LocalArea.focus();
return false;
}
if (isFieldEmpty(document.forms[0].MeetingDays,"Please enter the meeting days and times of the club.","text")) return false;
if (isFieldEmpty(document.forms[0].Cost,"Please advise of costs or indicate no cost.","text")) return false;
document.forms[0].Submitted.value = ("Yes");
document.forms[0].submit();

Thanx J but that is already the case as you can see