The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Web Design
> JavaScript Development
|
Window.open doesn't account for parms, and mouseover not working?
Discuss Window.open doesn't account for parms, and mouseover not working? in the JavaScript Development forum on Dev Shed. Window.open doesn't account for parms, and mouseover not working? JavaScript Development forum discussing JavaScript and DHTML, AJAX, and issues such as coding cross-browser JavaScript.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

February 20th, 2013, 03:11 PM
|
|
Contributing User
|
|
Join Date: Jun 2012
Posts: 106
 
Time spent in forums: 1 Day 24 m 29 sec
Reputation Power: 1
|
|
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,resiz eable=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.
|

February 20th, 2013, 04:06 PM
|
 |
Contributing User
|
|
|
|
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:
Quote: | 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>
|

February 20th, 2013, 06:24 PM
|
 |
Lost in code
|
|
|
|
|
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.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|