Thanks to everyone who has patiently helped me thus far!
Okay, I updated my JavaScript to the following:
<cfoutput>
<script language="Javascript">
function validateForm(adminchange){
var registeredCount = #registered.registered_count#;
for (i=0;i<adminchange.length;i++){
if (left(adminchange.elements(i).name, 11) == "status_name")
if (adminchange.elements(i).value == 1)
registeredCount = registeredCount + 1;
}
if (registeredCount > #classname.class_size#){
alert('The maximum class size is #classname.class_size#');
return false;
}
return true;
}
</script>
</cfoutput>
I noticed that in two of the IF statements, I had a single "=" instead of
"==" to check for equality...
However, here's the new situation. Although I no longer receive any
javascript errors, the form is still letting me submit to the action page,
even if I have selected beyond the maximum class size. Then, if I go back
and refresh the screen with the new data (i.e. all of the new registrants,
exceeding the class size), then try to change ANYTHING (even from a
"registered" status to a "cancelled" status), I get the alert message.
I'm ready to start beating my monitor with my floppy wrist pad...
PlEASE help so I can get some sleep tonight! <:D
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.