Turn on thread page Beta
    • Thread Starter
    Offline

    0
    ReputationRep:
    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.
    • Thread Starter
    Offline

    0
    ReputationRep:
    fixed it I just madre the code simpeler

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

    %>


    This works fine.
 
 
 
Poll
Have you ever experienced bullying?
Useful resources

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.