I tried a very simple client side script while messing around and I ran into something that I can't explain and can't get to work. This is about the simplest script you'll ever see, but it does not work and I really want to know why.
Browser maybe?? (running IE5)
All I'm doing is counting the form elements and putting them in a alert. Always gives me object does not support this property or method.
<HTML>
<HEAD>
<TITLE>Forms and Elements</TITLE>
<SCRIPT LANGUAGE="VBScript">
Sub cmdTest_OnClick
alert document.form1.elements.count
End Sub
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME="form1">
<INPUT TYPE="TEXT"><P>
<INPUT TYPE="TEXT"><P>
<INPUT TYPE="TEXT"><P>
<INPUT TYPE="TEXT"><P>
<INPUT TYPE="TEXT"><P>
<INPUT TYPE="BUTTON" NAME="cmdTest" VALUE="Test!">
</FORM>
</HTML>
Thanks I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.
Browser maybe?? (running IE5)
All I'm doing is counting the form elements and putting them in a alert. Always gives me object does not support this property or method.
<HTML>
<HEAD>
<TITLE>Forms and Elements</TITLE>
<SCRIPT LANGUAGE="VBScript">
Sub cmdTest_OnClick
alert document.form1.elements.count
End Sub
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME="form1">
<INPUT TYPE="TEXT"><P>
<INPUT TYPE="TEXT"><P>
<INPUT TYPE="TEXT"><P>
<INPUT TYPE="TEXT"><P>
<INPUT TYPE="TEXT"><P>
<INPUT TYPE="BUTTON" NAME="cmdTest" VALUE="Test!">
</FORM>
</HTML>
Thanks I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.