I am getting "access is denied" exception when executing resizeTo and moveTo
java script functions. I am using IE 6.0 SP1 on XP SP1 with all latest updates.
Steps to recraete this problem.
1. Open this page on IE.
2. Scroll down (Using scroll bar) and select/highlight last "Place content here" text.
3. Scroll up (Using scroll bar) and refresh the page. It will throw "Access it Denied" eception which will be captured by sample program and display message "Access is Denied Exception".
Here is the my sample html page.
<HTML>
<HEAD>
<TITLE>Test1.html</TITLE>
</HEAD>
<BODY>
<P>Place content here. <br/><br/><br/><br/><br/><br/></P>
<P>Place content here.<br/><br/><br/><br/><br/><br/><br/></P>
<P>Place content here.<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/></P>
<P>Place content here. <br/><br/><br/><br/><br/><br/></P>
<P>Place content here.</P>
<BR>
<Script language="JavaScript">
function positionView(){
try{
window.moveBy(0, 0)
window.resizeTo(500,500);
}catch(exeption){
alert("Access is Denied Exception");
}
}
positionView()
</Script>
</BODY>
</HTML>
I tried to set focus(onbeforeunload event) on different area on page but still getting same exception on resizeTo and moveTo. Please help me.
Thanks for your help
Deepak