Jump to content

[SOLVED] Help with Open window script


jvrothjr

Recommended Posts

[code]
<script language='javascript'>
  win = window.open('index.php', 'master', 'channelmode=no,scrollbars=yes,resizable=yes,status=1','True');
  window.opener=self; 
  if (self != win) { window.close(); }
</script>
[/code]

Above is my code for opening a new window with toolbars and menus off

this works if we use the DNS ID but not the IP address for any IE below 7  ???

But with IE7 both work but IE7 displays the URL address bar read only. ???

Is there a way to turn the URL on as read only in this script and see if this works in IE6 ???


Link to comment
https://forums.phpfreaks.com/topic/32583-solved-help-with-open-window-script/
Share on other sites

We have found a fix for this issue
[code]
<script language='javascript'>
window.onload = poponload;
function poponload()
{
//Set variables, version is IE version number
var ua = window.navigator.appVersion;
var msie = ua.indexOf ( "MSIE " );
var version = ua.substring(msie+5,msie+6);
//Open new window
var win = window.open ('index.php', 'master', "scrollbars=1,resizable=1,status=1,dependent=yes,alwaysRaised=yes");
//Check version number and run correct code
if (version >= "7")
{
if (win) {
window.open('', '_parent','');
window.close();
}
} else {
self.opener = this;
setTimeout('self.close()',500);
};
}
</script>
[/code]

This checks the IE version and action required based on that

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.