goaganesha
Programmer
Hi,
My website starts with a flashintro in a small popupwindow.
At the end of the movie, I open a new window which has to open to full screensize so in the new window i've put following code:
<script language="JavaScript1.2">
<!--
top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById) {
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
//-->
</script>
This works fine but here's the problem. If visitors don't watch the flash intro, the window is allready fullsize so the javascript should be denied 'cause it makes the window shake a bit which gets very annoying after 2 or 3 times.
so I've put in an if statement but still the window shakes.
what is wrong with this code?:
<script language="JavaScript1.2">
<!--
if (top.window != (0,0) || (top.window.outerHeight != screen.availHeight && top.window.outerWidth != screen.availWidth))
{
top.window.moveTo(0,0);
if (document.all)
{
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById)
{
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
}
//-->
</script>
Thanx for your help!
regards, goaganesha
My website starts with a flashintro in a small popupwindow.
At the end of the movie, I open a new window which has to open to full screensize so in the new window i've put following code:
<script language="JavaScript1.2">
<!--
top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById) {
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
//-->
</script>
This works fine but here's the problem. If visitors don't watch the flash intro, the window is allready fullsize so the javascript should be denied 'cause it makes the window shake a bit which gets very annoying after 2 or 3 times.
so I've put in an if statement but still the window shakes.
what is wrong with this code?:
<script language="JavaScript1.2">
<!--
if (top.window != (0,0) || (top.window.outerHeight != screen.availHeight && top.window.outerWidth != screen.availWidth))
{
top.window.moveTo(0,0);
if (document.all)
{
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById)
{
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
}
//-->
</script>
Thanx for your help!
regards, goaganesha