admin管理员组文章数量:1410730
I want to open a window from PHP. As it's impossible to do with PHP, I send to Javascript the following mand:
echo '<script type="text/javascript" language="javascript">window.open("/help/help_central.php","my window", "height=200, width=200, top=100, left=500, menubar=0, toolbar=0, location=0, status=0");</script>';
With FF 11.0 only height,width,top,left can be changed (for me !). I tried with yes/no but same effect.
Do you know a solution patible for ALL mon browsers (FF,IE,Safari,Chrome,Opera) ?
I want to open a window from PHP. As it's impossible to do with PHP, I send to Javascript the following mand:
echo '<script type="text/javascript" language="javascript">window.open("/help/help_central.php","my window", "height=200, width=200, top=100, left=500, menubar=0, toolbar=0, location=0, status=0");</script>';
With FF 11.0 only height,width,top,left can be changed (for me !). I tried with yes/no but same effect.
Do you know a solution patible for ALL mon browsers (FF,IE,Safari,Chrome,Opera) ?
- 2 QuirksMode - Popups – Brad Christie Commented Apr 25, 2012 at 12:24
-
2
try with
"mywindow"
without space on the name not"my window"
– jogesh_pi Commented Apr 25, 2012 at 12:25 - Pop up blockers will block this pop up in the wild. – epascarello Commented Apr 25, 2012 at 12:34
- mywindow or my windows: that doesn't change ! – Bertaud Commented Apr 25, 2012 at 22:05
- but QuirksMode gives answer to my questions ! – Bertaud Commented Apr 25, 2012 at 22:11
1 Answer
Reset to default 3Normally yes it works everywhere however not all the features are supported by all browsers.
This article is a good read to find out what works and what doesn't depending on the browsers.
http://www.quirksmode/js/popup.html
Another good reference is
http://www.gtalbot/BugzillaSection/Bug195867GDR_WindowOpen.html
You might want to consider using a modal window instead as that you will manage to make work everywhere and popup might also get blocked by browsers plugin security settings when a modal wont.
本文标签: javascriptwindowopen compatible for all browsersStack Overflow
版权声明:本文标题:javascript - window.open compatible for all browsers? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744896557a2631099.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论