Page 1 of 1

PHP/JavaScript Question

Posted: Thu Jul 19, 2007 2:12 pm
by thefreebielife
What is the name of the JavaScript code that on mouseover pops up a pop up window (NOT A NEW WINDOW, BUT A WINDOW WITHIN THE CURRENT WINDOW)? I cannot find it anywhere yet I have seen it done.

Also, would it be possible to echo things inside this pop up?

Thanks,
Jared

Posted: Thu Jul 19, 2007 3:26 pm
by Zoxive
Its not a single code.

Most of the time it is a hidden(visibility=hidden) <div>, then onclick it would simply set the style of the div to visible.

Code: Select all

<div style="visibility:hidden" id="hiddendiv"> Hello World</div>

<a href="javascript:void(0)" onclick="document.getElementById('hiddendiv').style.visibility=(document.getElementById('hiddendiv').style.visibility=='hidden')? 'visible' : 'hidden';">Show/Hide</a>
Now with this div you can do anything you want, make its position absolute, make it blue, width of 40% etc etc and put any images/text in it.