Results 1 to 8 of 8

Thread: Popup Window

  1. #1
    Join Date
    May 2009
    Posts
    23
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Popup Window

    1) Script Title: Auto-centering Popup Window

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...autocenter.htm

    3) Describe problem: I get the pop up window, but the orginal page also changes. Need help, all my external links do not open in new windows. what can i do.

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Ensure to cancel the anchor tag's normal behavior by using event.preventDefault() or by simply adding highlighted:
    Code:
    onclick="NewWindow(this.href,'name','400','400','yes');return false"
    Hope that helps.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  3. #3
    Join Date
    May 2009
    Posts
    23
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I already have the "return false" code. I have added a complete link that I am using, please let me know if you can spot an error. Many thanks.

    <A HREF="http://www.harzinfo.de" onclick="NewWindow(this.href,'name','600','600','yes');return false"><IMG SRC="logo_hvv_neu.jpg" WIDTH="148" HEIGHT="61" ALT="Harzer tourist board"></A>

  4. #4
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    It works fine on my end. Please provide a link to your page.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  5. #5
    Join Date
    May 2009
    Posts
    23
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    http://www.abbeywood-antiques.co.uk/bad%20grund.html

    please look and see if you can spot the error, many thanks for your time

  6. #6
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    It works fine on my end. Tested across IE, FF, Safari, Opera and Chrome.

    Ensure you have JS enabled at your end.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  7. #7
    Join Date
    May 2009
    Posts
    23
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hi, thanks for your time. The code works on my computer, but my wifes computer next to me it does not. You mentioned JS, sorry could you explain what that is.

  8. #8
    Join Date
    May 2009
    Posts
    23
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    ignore that comment, I understand what JS is although I do not know how to check my wifes computer to see if its enabled.

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
  •