PDA

View Full Version : go to full screen in excisting window



Hilholland
10-20-2008, 07:54 PM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>MyUrl Titel</title>
<script language="JavaScript1.2">
<!--

/*
Screen Size Redirect script (By Robert @ http://members.tripod.com/technological_tinker/)
Submitted to Dynamicdrive.com to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

window.resizeTo(screen.availWidth,screen.availHeight);
window.moveTo(0,0)


if (screen.width==800||screen.height==600) //if 800x600
window.location.replace("http://myUrl1")


else if (screen.width==1024||screen.height==768) //if 640x480
window.location.replace("http://myUrl2")

else //if all else
window.location.replace("http://myUrl3")


//-->
</script>
</head>

<body>
</body>
</html>


the section of the above code that is red coloured, I have placed so
window.location.replace("http://myUrl1") opens myUrl1, 2 or 3 in the same window at full screen.

Now this works on my Mac (using Safari) nicely, but on my winPC (using IE) it does position the window at 0,0 but does not display the window at full screen.

Has anybody got a fix or a new idea how i can achieve full screen on winPC too? Remember that I am not creating a new window, but want to remain in the excisting window.

Eddy

zaphod42
10-20-2008, 09:11 PM
I'm not having any problems using your code to make this work in ie6 on xp

Hilholland
10-21-2008, 06:01 PM
hallo again zaphod42,

is the window also opening at full screen? Even at screen resolutions higher than 1024x768? Not at my end.

Hilholland
10-21-2008, 06:14 PM
strange