Click to See Complete Forum and Search --> : Making bits disappear..!


pharcyde
10-08-2004, 09:39 AM
Hey everyone...

Has anyone seen those bits on certain webpages where you get to show/hide parts of a table?

I.e Say you have a persons name and picture,
1. You click he 'show' button.
2. An extra piece of info appears.
3. The show button is now (another row?) further down, and 'show has changed to 'hide'.
4. Clicking 'hide' reverses steps 1-3.
5. Does anyone know what I'm talking about!?!?! :confused:

I'm looking for a tutorial or hints on what I should be looking for :D

Because I haven't got a clue what the technical terms are, i dunno if I've managed to explain myself properly! Let me know If I havent!

Cheers loads, LeeBoy

JPnyc
10-08-2004, 09:56 AM
document.getElementById('idNameHere').style.display='none';

That will make stuff disappear. To make it reappear,

document.getElementById('idNameHere').style.display='inline'; or block, or whatever you wish.

Then you call the function onclick of some button or something that you want the user to click on to initiate the action.