Results 1 to 4 of 4

Thread: Need help with popup

  1. #1
    Join Date
    Jan 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Need help with popup

    I'm using a script that I found on this page
    http://javascript.internet.com/navig...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!!!

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

  3. #3
    Join Date
    Jan 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thank you, but is there no way to make that window close?

    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?

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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:

    Code:
    <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:

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

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •