desrosj
12-13-2006, 03:16 PM
Hey,
I have code in my site that resizes the browser window when the main page is loaded. It doesnot work in Opera however. Any one care to explain why for me? Here is my code.<script type="text/javascript" language="JavaScript">
var swidth = screen.width;
var sheight = screen.height;
function detectAndResizeScreen()
{
if(swidth < 1024 || sheight < 768)
{
window.resizeTo(swidth,sheight);
}
if(swidth == 1024 && sheight == 768)
{
window.moveTo(0,0);
window.resizeTo(1024,768);
}
else
{
window.resizeTo(1024,768);
}
}
</script>
I have code in my site that resizes the browser window when the main page is loaded. It doesnot work in Opera however. Any one care to explain why for me? Here is my code.<script type="text/javascript" language="JavaScript">
var swidth = screen.width;
var sheight = screen.height;
function detectAndResizeScreen()
{
if(swidth < 1024 || sheight < 768)
{
window.resizeTo(swidth,sheight);
}
if(swidth == 1024 && sheight == 768)
{
window.moveTo(0,0);
window.resizeTo(1024,768);
}
else
{
window.resizeTo(1024,768);
}
}
</script>