Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Looping .

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Looping .
  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 >>
 Looping . - 7/26/2001 9:08:59 AM   
  gargi

 

Posts: 1
Score: 0
Joined: 7/26/2001
From: USA
Status: offline
Hi evryone,
I am a beginner in ASP and having a problem in looping. I am using For...to next function. Here i am trying to generate number of input boxes on demand by user. but when i request for example 3 boxes, it is not generating. The code is as follows:

strnumofstyle = strNUMOFSTYLEValue
For v=1 to strnumofstyle
strSTYLENUMHTML= "<INPUT TYPE = """ & FieldType & """ NAME = ""STYLENUM" &v&""" ID = ""STYLENUM" &v&""" VALUE = """ & request("STYLENUM"&v)& """>"
strStyleHTML = strStyle1HTML & "</table>"
next
Response.Write (strStyleHTML)

Any help will be highly appereciated.
Thanks.

A Maloo
http://www.ezinfocenter.com/1726616/Free
 
 
Post #: 1
 
 Re: Looping . - 7/26/2001 6:55:59 PM   
  imav8n

 

Posts: 95
Score: 0
Joined: 7/3/2001
From: USA
Status: offline
I broke this up into quite a few lines, so you could see what I was doing...you can always consolidate them back, but this makes your code easier to read:

<%
For v=1 to StrNumOfStyleValue

strTemp = "<INPUT TYPE="
strTemp = strTemp & FieldType
strTemp = strTemp & " NAME=STYLENUM" & v
strTemp = strTemp & " ID=STYLENUM" & v
strTemp = strTemp & " VALUE=STYLENUM" & v
strTemp = strTemp & ">"
strOutput = strOutput & strTemp
next

strOutput = strOutput & "</table>"
Response.Write (strOutput)

~imav8n

(in reply to gargi)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Looping . 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