Announcement

Collapse
No announcement yet.

variables in html

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    variables in html

    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?

    #2
    Yes you can use variables if you use client side Javascript.
    -Rupp
    sigpic

    Comment


      #3
      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


        #4
        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


          #5
          Jeff,
          It can't be done in html alone but a java script is the best way to go.
          -Rupp
          sigpic

          Comment


            #6
            thanks

            Comment

            Working...
            X