PDA

View Full Version : Need help with popup



glowingnova
01-19-2009, 06:50 PM
I'm using a script that I found on this page
http://javascript.internet.com/navigation/absolute-popup-box.html
to make an overlaying popup window appear.
It works great but you can't close it.

Can anyone help me with how to add a something to make the window close? I have a little graphic of an "x" that I want to be able to click on and close the overlay window.

PS I am a novice to JavaScript. I need very very clear instructions.

Thank you so much!!!

Nile
01-20-2009, 04:15 AM
Try this script. (http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/index.htm)

glowingnova
01-20-2009, 03:37 PM
Thanks for the script, but it is a little complicated for me. Is there not a way that I can add something to the javascript to make the window closable?

jscheuer1
01-20-2009, 04:38 PM
In the demo, simply clicking on the activating link again will close it. If you want a separate link on the box to close it, first give the activating link a unique id:


<a id="boxActivator" href="aboutJSS.html" onClick="return show_hide_box(this,200,270,'2px dotted')">this one</a>

Then you can make up a link on the external page in the box to close the box:


<a href="#" onclick="return parent.show_hide_box(parent.document.getElementById('boxActivator'),200,270,'2px dotted')">Close</a>