[Javascript] "document.exf.dis" is not an object

Rodney Myers rodney at aflyingstart.net
Thu Jun 7 04:30:22 CDT 2001


1) At the point where this line is read the whole pages is not loaded so the form exf is not yet in place.

> document.exf.dis.value=1;

Remedy would be to have the line in a function which is called onload

2) Radio buttons are an array
So I think not
document.exf.dis.value=1;
but
document.exf.dis[N]value=1;
where N is the index of the radio button eleemt you wish to address, the first button being zero.

3) Hard to see what the line is meant to do since the radio buttons already have values
<input type="radio" name="dis" value="1"
onclick="document.exf.disabled.value=1" checked>

hth

Rodney


yahress nataf wrote:

> I got this error :
> "document.exf.dis" is not an object
>
> here is the code :
> <html>
>
> <head>
> <script>
> document.exf.dis.value=1;
> function change(_i) {
>   if (document.exf.disabled.value==1) return;
>   eval("document.exf.c"+_i+".checked = ! document.exf.c"+_i+".checked");
> }
> </script>
> </head>
>
> <body>
> <BR>
> <form name=exf>
>
> <h4><font face="Tahoma, Verdana, Arial, sans-serif" color="#006600"><img
> border="0" src="statestreet.gif" width="295"
> height="118">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></h4>
> <h4 align="left"><font face="Tahoma, Verdana, Arial, sans-serif"
> color="#006600">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> TRAINING AND DEVELOPMENT</font></h4>
> <p><font face="Tahoma, Verdana, Arial, sans-serif" size="2"><b>Q.1) Career
> Development Opportunities were available to me.</B></font></p>
> <p>
> YES<input type="radio" name="dis" value="0"
> onclick="document.exf.disabled.value=0"><br>
> NO<input type="radio" name="dis" value="1"
> onclick="document.exf.disabled.value=1" checked><br>
> <p><b>
> Q.1a. YES</b>,&nbsp;
> <p>
> <b>What opportunities did you benefit from?</b>
>
> <p><font face="Tahoma, Verdana, Arial, sans-serif" size="2">1 <input
> type="checkbox" name="Ins" value="Yes" onclick="change(1)"><b>Institute
> Classes<br>
>   2 <input type="checkbox" name="instit" value="Yes" onclick="change(2)"
> checkbox">Educational Assistance<br>3
> <input type="checkbox" name="necf" value="Yes" onclick="change(3)">NECF
> Courses<br>
>   4 <input type="checkbox" name="icdp" value="Yes"
> onclick="change(4)">ICDP<br>
>   5 <input type="checkbox" name="virtinst" value="Yes"
> onclick="change(5)">Virtual Institute<br>
>   6 <input type="checkbox" name="mentoring3" value="Yes"
> onclick="change(6)">Mentoring program</b>
> &nbsp;</font>
>
> <p><font face="Tahoma, Verdana, Arial, sans-serif" size="2">
>   7<input type="checkbox" name="mentoring" value="Yes"
> onclick="change(7)"><b>One on
> One Job Training&nbsp;</b></font>
>
> <p><font face="Tahoma, Verdana, Arial, sans-serif" size="2">
> <b>8<input type="checkbox" name="other" value="Yes"
> onclick="change(8)">Other&nbsp;</b></font>
>
> &nbsp;<BR>
> <input type=hidden name=disabled value=1>
>
> </form>
>
> </body>
> </html>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> http://www.LaTech.edu/mailman/listinfo/javascript

--
Shop at ssistant Add-ons and Developer Workshops
http://www.aflyingstart.net/addons/

Enquiries regarding Shop at ssistant Classic training :
Call 01256 880770

Rodney Myers
Based in Oxford, England
Technical Director, Shop at ssistant eCommerce Solutions






More information about the Javascript mailing list