Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


For Next Loops in vbscript - any help appreciated!

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,823
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
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!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 For Next Loops in vbscript - any help appreciated! - 4/9/2003 6:53:44 PM   
  nugget

 

Posts: 2
Score: 0
Joined: 4/9/2003
From:
Status: offline
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

can anyone please help me here?

thankyou! anticipating your reply!
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> For Next Loops in vbscript - any help appreciated! Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts