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

    Join Date
    Jun 2012
    Posts
    150
    Rep Power
    3

    Question Window.open doesn't account for parms, and mouseover not working?


    Hi all,

    Two issues:

    1. When I mouseover this link, I actually see the url instead of the "MySite.com some information" message I'd like on the onMouseOver event.

    2. When I click the link, it opens in a new tab (using I.E. 9) instead of a new window...which is fine. However, the new window (or tab) should not have the address url, etc based on the parameters I'm sending to window.open

    The link:
    Code:
    <a href="javascript:window1('http://mysite.com/somepage.html');" onMouseOver="window.status='MySite.com some information'; return true" onmouseout="window.status=' '; return true;">Some information</a>
    The js:
    Code:
    function window1 (url) {
        window.open(url, "Some information", "height=400,width=600,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizeable=0,scrollbars=0,status=0,toolbar=0");
        return;
    }
    Ideas on why those things are happening?

    Thanks.

    Note: I'm not sure why the word "resizable" has a space in it, it doesn't in my source and I've tried taking it out here. Could be something with this editor.
  2. #2
  3. A Not To Shabby Code Smurf
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2008
    Posts
    1,183
    Rep Power
    184
    This takes care of Issue 1:
    Code:
    <a href="MySite.com" onclick="window1('http://mysite.com/somepage.html');return false">Some information</a>
    However... Issue 2; I am not sure what you mean by:
    Originally Posted by we5inelgr
    However, the new window (or tab) should not have the address url, etc based on the parameters I'm sending to window.open
    Because your not sending any parameter, in the url of your window.open(). An example of sending a parameter; would be:
    Code:
    <a href="MySite.com" onclick="window1('http://mysite.com/somepage.html?myQueryString=123');return false">Some information</a>
  4. #3
  5. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7170
    1. Nearly all modern browsers do not allow you to set window.status.

    2. Nearly all modern browsers don't allow you to do certain things when opening new windows - such as hiding the address bar.

    Yes, the options exist, but for the most part they have been removed from browsers for security reasons.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo