Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member Gary's Avatar
    Join Date
    Jul 2012
    Location
    Vancouver, Canada
    Posts
    8
    Member #
    32305

    popup window opens TAB instead...

    Hi Folks.

    i'm a bit of a 'nerd' at Javascript, so please bear with me. I'm using an older popup window code (not an auto popup, but one that visitor clicks on, fired by onclick) but in SAFARI browser, it opens TAB not small popup window.

    here's the code:

    Code:
    function popUp(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=700,height=595,left = 462,top = 234');");
    };
    fun
    and the code is fired in the anchor tag like so, by another script in the <body>...
    Code:
    <script type="text/javascript">
              document.write('(<a href="javascript:popUp(\'popups/myfile.htm\')">read more</a>)</p>');
              </script>
    can't quite recall why I scripted a doc.write rendering; this goes back a few years (and my memory cells are disappearing!)

    but anyway, it works on browsers exept SAFARI, where it opens a TAB, not a small defined popup window.

    can anyone suggest a fix or perhaps a better popup snippet?

    thanks for any feedback ...

    Gary

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,482
    Member #
    425
    Liked
    2784 times
    There isn't one. Depending on the user's browser configuration, links may open in a new tab as well.

    You also don't want to open things up in a new window, even if it's on click. Hyperaggressive toolbar popup blockers such as the one in the Yahoo! toolbar will kill it.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Remove Ads

Posting Permissions

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

Tags for this Thread

All times are GMT -6. The time now is 09:46 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com