Is there a way to define and use a variable in HTML? I have code where I scroll through a number of pictures and would like to use code that uses a variable to reference the picture name. (e.g. picture1.jpg, picture3.jpg, picture5.jpg, etc. - I would like to do something like pictureX.jpg, pictureX+2.jpg, etc.) Can this be done?
Announcement
Collapse
No announcement yet.
variables in html
Collapse
X
-
Hey Jeff,
Not sure exactly what your asking but here's my guess.
You have a folder of images and you want to be able to display them on your page doing something like this:
for image count in a folder
count = count + 1
response.write("<img src=images/picture" & count & ".jpg>")
next
If my guess is right, let me know and I could help you. I would be using vbscript to do this.
Eric
Comment
-
thanks guys. I have it working. Rupp, I am using it in webcam32 html code which I believe uses javascript.It's working nicely...thanks for the lead. Is this possible to do using html? I have some straight html code where I would like to do something similar so that it is easy to modify in the future.
Eric, it was html code I was trying to work it into - thanks for the help.
Comment
Comment