View Full Version : opening new window (NOT new tab)
07-13-2011, 02:38 AM
07-13-2011, 03:55 AM
this will open in a brand new window. as far as avoiding pop up blockers the best i have seen is to send a message to the user that they are blocking popups. maybe someone else knows a trick on that one.
<a href="your url" target="_blank">click here</a>
07-13-2011, 03:56 AM
target="_blank" does not open a new window in tabbed browsers... it opens a new tab....
07-13-2011, 03:58 AM
ok so use window.open method and size your window. how about that?
07-13-2011, 04:03 AM
Try forcing the *size* of the popup. If the size doesn't match the existing window it should pop up a separate window.
window.open( url, someName, "width=500, height=600" );
HEH! Too slow. BTW, just tested it in FF and MSIE. Yep, worked.
07-13-2011, 04:09 AM
i tried both of those. the window.open one is blocked by popup blockers, and the resizing of _blank just resizes the entire window, tabs and all... which is not what i want :S
07-13-2011, 04:20 AM
window.open is *NORMALLY* only blocked by popup blockers if the code is invoked automatically by the page. When you use something like
<a href="#" onclick="window.open(url,'foo','width=600,height=600');return false;">click</a>
it will only be blocked by the most agressive blockers. But there's no way around those. Normal blockers will allow it.
07-13-2011, 04:21 AM
ok i guess ill use that. it does seem to work on some browsers ive tested. the rest i guess ill just give an Alert for the user to hold CTRL key and click again, thanks
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.