Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript javascript to show / hide an image

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #27823
    danmartin
    Member

    Hi,
    I am using javascript to show / hide an image when a checkbox is checked. This works ok.But how do I hide the image when the page loads? I have tried using enable="false", but when I do that, the javascript fails to locate the image on the page and the image does not respond.So I set the image url to a transparent image, so the user will not see any image when the page loads, and when the user clicks the checkbox,I change the image url to the required image.Is this the best approach for this issue?

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.