Hi.
I'm having a problem with some javascript which queries the user's browser to find out resolution and then open's a new browser window with no toolbars whatsoever which fills the page.
I have heard that for a minority of users the new browser window contains all the normal toolbars even though I specify them not to be there. What is even stranger is that a user with identical version of interent explorer and java turned on is recieving this error.
Here is the script:
<script language="JavaScript">
<!--
function redirectPage() {
if ((screen.width == 640) && (screen.height == 480))
window.location.href= "640.htm";
else if ((screen.width == 800) && (screen.height == 600)) {
window.open("home.htm","main","width=790,height=550,left=0,top=0");
window.close();
}
else window.open("home.htm","main","width=1015,height=710,left=0,top=0");
window.close();
}
//-->
</script>
"640.htm" is a page telling the user to increase resolution, "home.htm" is the home page with an auto stretch table to fill out the 1024x800 screen. "window.close" refers to the window which launches the new browser window. You can see this script in action at <!-- m --><a class="postlink" href="http://www.lapsuslinguae.com">http://www.lapsuslinguae.com</a><!-- m --> when you click on the logo a small window opens containing this script on an onload() event which then opens the main home page.
I would appreciate any help you can offer me - why do the results of this script vary even with identical version of explorer? What is the correct way of signalling the browser to hide all toolbars and scrollbars?
thanks
alasdair
I'm having a problem with some javascript which queries the user's browser to find out resolution and then open's a new browser window with no toolbars whatsoever which fills the page.
I have heard that for a minority of users the new browser window contains all the normal toolbars even though I specify them not to be there. What is even stranger is that a user with identical version of interent explorer and java turned on is recieving this error.
Here is the script:
<script language="JavaScript">
<!--
function redirectPage() {
if ((screen.width == 640) && (screen.height == 480))
window.location.href= "640.htm";
else if ((screen.width == 800) && (screen.height == 600)) {
window.open("home.htm","main","width=790,height=550,left=0,top=0");
window.close();
}
else window.open("home.htm","main","width=1015,height=710,left=0,top=0");
window.close();
}
//-->
</script>
"640.htm" is a page telling the user to increase resolution, "home.htm" is the home page with an auto stretch table to fill out the 1024x800 screen. "window.close" refers to the window which launches the new browser window. You can see this script in action at <!-- m --><a class="postlink" href="http://www.lapsuslinguae.com">http://www.lapsuslinguae.com</a><!-- m --> when you click on the logo a small window opens containing this script on an onload() event which then opens the main home page.
I would appreciate any help you can offer me - why do the results of this script vary even with identical version of explorer? What is the correct way of signalling the browser to hide all toolbars and scrollbars?
thanks
alasdair