#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2001
    Location
    New York
    Posts
    89
    Rep Power
    14

    JavaScript Window Issue


    A freind of mine gave me this script to spawn java script windows...

    //Open Window
    function spawnWindow(windowPage,wSize,hSize) {
    repWindow=window.open(windowPage,"reportWindow", "width="+wSize+", height="+hSize+", menubar=0, directories=0, titlebar=0, toolbar=0, scrollbars=0, status=1, resizable=0");
    repWindow.focus();
    }

    and I calling it like this:

    <a href="javascript:spawnWindow('freindpro.php','300','150')">Send this profile to a freind!</a>

    My question is this doesn't seem to work in Netscape... I will rephrase that.. it opens a window.. just not the right size window.

    Thanks for your help!

    rootdog
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2001
    Posts
    765
    Rep Power
    14
    Try eliminating the whitespace in the 'window features' string; i.e.:

    "width="+wSize+",height="+hSize+",menubar=0,directories=0,titlebar=0,toolbar=0,scrollbars=0,status=1 ,resizable=0");

    btw, you don't have to refer to every feature - if you set just one to 'yes' or '1' the others will be suppressed as long as you don't mention them.

    Better way to call it:

    <a href="freindpro.php" target="_blank" onclick="spawnWindow('freindpro.php','300','150');return false;">Send this profile to a freind!</a>
    Last edited by mrrichardfeder; January 23rd, 2002 at 04:40 PM.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Posts
    52
    Rep Power
    13

    pixels


    Try to send width and heigth in pixels format like
    300px, 150px

IMN logo majestic logo threadwatch logo seochat tools logo