Image doubt

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rsrinivasan
    New Member
    • Mar 2007
    • 221

    #1

    Image doubt

    Hi,

    In my Project I displayed an image for Menu. But what i need is the content of image is dynamic. How to do it?. Whether it is possible or not.

    Thanks,
    Srinivasan r.
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    What do you mean by dynamic?

    Comment

    • rsrinivasan
      New Member
      • Mar 2007
      • 221

      #3
      Originally posted by acoder
      What do you mean by dynamic?
      Hi,
      Dynamic means the content of the image is different over time.

      Thanks,

      Comment

      • weberwhennner
        New Member
        • Dec 2006
        • 13

        #4
        Originally posted by rsrinivasan
        Hi,
        Dynamic means the content of the image is different over time.

        Thanks,
        I'm sill unsure what you mean by "Dynamic". If you want it to change, you could precode a bunch of URL's and randomly choose an image after the "dynamic" time period.

        Comment

        • pbmods
          Recognized Expert Expert
          • Apr 2007
          • 5821

          #5
          To change a displayed image, assign your image an id:

          [code=html]
          <img id="theBigPictu re" alt="and you're missing it!" src="somefile.j pg" />
          [/code]

          Then change the src of the image via JavaScript:

          [code=javascript]
          document.getEle mentById('theBi gPicture').src = 'someotherfile. jpg';
          [/code]

          Comment

          Working...