Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jul 2011
    Posts
    118
    Thanks
    6
    Thanked 0 Times in 0 Posts

    .innerHTML= Image && Var??

    Hey everyone,

    I'm struggling to get this to work, I have a countdown timer with the timer itself declared as, 'out'. This is then set as the content for a div using:

    Code:
    document.getElementById(iid).innerHTML=out;
    My code basically says, if the countdown timer hasn't finished, do the above, if however it has reached the end, set the contents of the div to something else.

    What I need to do is add an image above the timer which disappears with it when it reaches 0, so essentially, I need to be able to do something like the following (except obviously in the correct syntax, if it exists).

    document.getElementById(iid).innerHTML="<img src='images/dateheader.png'><br>" out;
    Is this possible?

    Thanks

  • #2
    Regular Coder
    Join Date
    Jul 2011
    Posts
    118
    Thanks
    6
    Thanked 0 Times in 0 Posts
    Never mind, I just edited the timer itself to contain the image above.
    Thanks anywhoo


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •