Menu
I’m having some trouble with Javascript and Coldfusion.
I have 10 dynamically created textboxes and select boxes on my page. eg:
<cfoutput>
<cfloop from=”1″ to=”10″ index=”Variables.myLoop”>
<input type=”text” name=”textBox#myLoop#”>
….
<select name=”selectbox#myLoop#”>
…
Now I need to do validation on this but I cannot get Javascript to reference the name in a loop
for (foo = 1; foo < 11; foo++) {
if (document.form.textbox[foo].value != “”)
…..
My error occurs in the above line. Can anybody help or point me in the right direction?
Thanks