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
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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.