PDA

View Full Version : Image hidden and shown


chinni
09-03-2002, 06:58 AM
at first instant, i want to hide an image and when i check a checkbox and click a button, the hidden image should also be shown.

For example, let us assume there is test.php.In this form, there is a check box and a button.When i check this box and hit the button, i've to display an image along with the button on this form.
any ideas?

Thanks in advance

Uranium-235
09-03-2002, 01:02 PM
That would require some javascript I believe (unless you want to reload the page, preferrably passing the stuff into post headers)

Note: this is off the top of my head, so don't try it directly

you could create a null image (totally transperant) and put it in with a name

images/transprtn.gif

then with the button, you could tie a javascript callback into it like this

<input type="button" value="change image" onClick="document.theimage.src='images/newimage.gif'">

that's just off the top of my head. and I'm not 100% clear about what you want here.

Cogs
09-24-2002, 09:09 PM
You should look into JavaScript for this because PHP really has nothing to do with what you need.


Cheers

Halide
09-24-2002, 10:14 PM
hey, Cogs, welcome ;)