Hi Arnnie,
> I have an asp form in which the user has to select on[e] of
> 4 choices...
> This option is required.
>
> The code is as follow:
> ...
> How can I use this code?
With major revisions. :)
'// ========================================================
if (ckopt("EmployeeStatusChange") == false) {
errorMsg += "\n\t Employee Status Change \t"
errorMsg += "- Enter Employee Status Change";
}
'// ========================================================
function ckopt(aobj) {
var ao = document.getElementsByName(aobj); // select
for (i=0; i < ao.length; i++) {
var o = ao(i); // get object reference
if (o.checked == true){ // test it
return(true); // something is checked
}
}
return(false); // default to failure
}
'// ========================================================
This code is a modified version of one of the routines in my script
library, linked from here:
http://ReliableAnswers.com/JS/
Regards,
Shawn K. Hall
http://12PointDesign.com/
http://ReliableAnswers.com/
'// ========================================================
Everyone has a photographic memory; Some don't have film
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [email protected]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/active-server-pages/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/