PHP/JavaScript Question

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
thefreebielife
Forum Contributor
Posts: 126
Joined: Thu Apr 26, 2007 2:59 pm

PHP/JavaScript Question

Post 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
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Post 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.
Post Reply