This discussion is closed.
AT82
Badges: 0
Rep:
?
#1
Report Thread starter 16 years ago
#1
I am producing a page that displays my record collection in ASP from an access database. Under condition I have numbers one to 5. If its 5 I wanted to display 5 stars, if its 2 then 2 starsetc. The problem is the for loop dosn't seem to able to work with variables.

for example this works fine

Code:
For iCounter =1 to 2
								 response.write "<IMG SRC='star.jpg'>"
								Next
this dosn't

Code:
inum=3
  For iCounter =1 to inum
								 response.write "<IMG SRC='star.jpg'>"
								Next
With the second bit code the ASP page just ignores it completly.
0
AT82
Badges: 0
Rep:
?
#2
Report Thread starter 16 years ago
#2
fixed it I just madre the code simpeler

For iCounter =0 to objRS ("condition")
response.write "<IMG SRC='star.jpg'>"
Next

%>


This works fine.
0
X
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

What are you most likely to do if you don't get the grades you were expecting?

Go through Clearing (247)
39.39%
Take autumn exams (186)
29.67%
Look for a job (21)
3.35%
Consider an apprenticeship (25)
3.99%
Take a year out (110)
17.54%
Something else (let us know in the thread!) (38)
6.06%

Watched Threads

View All
Latest
My Feed