PDA

View Full Version : Make a div invisible


timbaah
10-11-2006, 01:52 PM
Hello Actionscripters..

I never used actionscript to use javascripts with it, and now I have too, and so I have this problem:

I want a popup to be invisible when it's done playing. The popup is in a div named "this" .
So in the last frame of the animation I entered this script:

getURL("javascript:document.getElementById('this').display ='hide';"); :o

But this doesn't seem to work so I need a little help from you actionscripters. :rolleyes:

Many thanks, I hope I can do something with you're answers...:D

jsebrech
10-12-2006, 12:02 PM
try this:
getURL("javascript:document.getElementById('this').style.d isplay='none';");

senocular
10-12-2006, 03:20 PM
There are two ways, really; one makes the div invisible, the other removes the div from the display.

display='none';

removes the div from the display. If you just want to make it invisible, though, you should use

visibility='hidden';

The difference is, using visibility, the div remains in the document flow and continues to take up space even though it cant be seen where as a display of none makes it as though the div was never there to begin with.