All Forums >> [Scripting] >> WSH & Client Side VBScript >> For Next Loops in vbscript - any help appreciated! Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
I'm in a bit of a dilemma...please tell me what is the right thing to do.
when i create a 'for next loop' to create the number of labs the user enters and a textfield beside each one for the user to enter the 'number' of the lab, i.e: ----FORM PAGE <% dim varNumberLabs, varLineCounter
'assign variable to hold number submitted varNumberLabs = Request.Form("LabNumbs")
'Print out contents of for loop For varLineCounter = 1 to varNumberLabs ' Response.Write "Lab: "%>
next %> name = "LabNumbs"> -------
------PAGE THAT REQUESTS FORM <* dim varLineCounter 'Print out contents of for loop For varLineCounter = 1 to varNumberLabs Response.Write "Lab: " Response.Write Request.Form("Labs") Response.Write "Time from: " Response.Write Request.Form("TimeFrom") Response.Write "To: " Response.Write Request.Form ("TimeTo") Response.Write "Students: " Response.Write varStudNumb Response.Write " " Next %> ------- ...this does not assign different numbers to each lab so that i could, in the next page have:
'this is what we need to get lab:1 <--number of lab filled in text box. lab:2
'this is what i am getting lab: 1,2 <--the for loop is going over and over again and i do not know where to put a break lab: 1,2