IE denies my window.resizeTo and window.moveTo
Posted: Thu Jan 15, 2009 6:26 am
I want to use a DRM wrapper (softwarePassport) which supports integration of html elements (using IE activeX control) to activate the wrapped software etc.
Because the program itself doesn't contain an option to make the html window resizable or not, I thought to use javascript in order to make the window non-resizable,
Firefox executes my code but IE denies to execute the script.
First I used this code to check with a timeout and resize:
Worked in Firefox, IE denied access.
So I thought to use the onresize event:
But this doesn't work either. Any ideas?
Because the program itself doesn't contain an option to make the html window resizable or not, I thought to use javascript in order to make the window non-resizable,
Firefox executes my code but IE denies to execute the script.
First I used this code to check with a timeout and resize:
Code: Select all
<!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=iso-8859-1" />
<title>Untitled Document</title>
<SCRIPT LANGUAGE="JavaScript">
function alarm()
{
var t=setTimeout("javascript:doResize()",2);
}
function doResize() {
var x = 800;
var y = 600;
window.resizeTo(x, y);
window.moveTo(screen.width/6,screen.height/6);
var t2=setTimeout("javascript:alarm()",2);
}
</SCRIPT>
</head>
<body onload="alarm();">
</body >
</html>So I thought to use the onresize event:
Code: Select all
<!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=iso-8859-1" />
<title>test</title>
<SCRIPT LANGUAGE="JavaScript">
function doResize() {
var x = 800;
var y = 600;
window.resizeTo(x,y);
window.moveTo(screen.width/6,screen.height/6);
}
</SCRIPT>
</head>
<body onresize="javascript:doResize()">
</body >
</html>