Hello all! I'm fairly new to HTML, so I appreciate a good explanation.
If I have a list of controls on my web page, text boxes for example, and I want to reference them as an array, how can I group them together? Can I do this in HTML, or must it strictly be within the scripting code? (I'm most familiar with VB, but can read through JScript if necessary)
Here is a sample to work off of...
So, I would like to do something such as this...
Thanks all for your help, any tips/pointers will be appreciated!
He who has knowledge spares his words, and a man of understanding is of a calm spirit. Even a fool is counted wise when he holds his peace; when he shuts his lips, he is considered perceptive. - King Solomon
If I have a list of controls on my web page, text boxes for example, and I want to reference them as an array, how can I group them together? Can I do this in HTML, or must it strictly be within the scripting code? (I'm most familiar with VB, but can read through JScript if necessary)
Here is a sample to work off of...
Code:
<HTML>
<HEAD>
<TITLE>File Folder Security</TITLE>
<SCRIPT TYPE="text/vbscript">
Sub subInit()
Document.frmTest.txtTest1.Value = "test1"
Document.frmTest.txtTest2.Value = "test2"
Document.frmTest.txtTest3.Value = "test3"
End Sub
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME="frmTest">
<INPUT TYPE="Text" NAME="txtTest1" VALUE="">
<INPUT TYPE="Text" NAME="txtTest2" VALUE="">
<INPUT TYPE="Text" NAME="txtTest3" VALUE="">
</FORM>
<SCRIPT TYPE="text/vbscript">
Call subInit()
</SCRIPT>
</BODY>
</HTML>
Code:
Sub subInit()
Dim i
For i = 1 to 3
Document.frmTest.txtTest(i).Value = "test" & i
Next
End Sub
Thanks all for your help, any tips/pointers will be appreciated!
He who has knowledge spares his words, and a man of understanding is of a calm spirit. Even a fool is counted wise when he holds his peace; when he shuts his lips, he is considered perceptive. - King Solomon