Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1568
  • Last Modified:

window.resizeTo generates "Access is denied" error ONLY after moving the scrollbar

I am using window.resizeTo to do resizing. This works fine as long as I don't touch/move the scrollbar. But as soon as I do and then try to resize the window again, I get "Access is denied". Any idea what is causing this? It is very weird.

To make my problem simple, I created a simple html page to demonstrate the problem:
<head>
<script type="text/javascript">
function setsize(w,h) {
window.resizeTo(w,h);
}
</script>
<title>resize test</title>
</head>

<body>
resize test
<br><br>
<form>
<select onChange="setsize(600,400)">
      <option>option 1</option>
      <option>option 2</option>
</select>
</form>
<br>
TEST
<br>
TEST
<br>
TEST
<br>
TEST
<br>
TEST
<br>
TEST
<br>
TEST
<br>
TEST
<br>
TEST
<br>
TEST
<br>
TEST
<br>
TEST
<br>
TEST
<br>
TEST
<br>
TEST
<br>
TEST
<br>
TEST
<br>
TEST
<br>
TEST
<br>
TEST
<br>
TEST
<br>
TEST
<br>
TEST
<br>
TEST
</body>

Here are the steps:
1. Open the html page in IE browser. I am using IE 6.0.2800.1106
2. Choose any option in drop down. It will always resize to 600x400. The resizing works fine at this point.
3. Move the scrollbar around a little bit.
4. Trying resizing again gives "Access is denied" javascript error and window does not resize.

Please help. Thanks.
Denton
0
dentonsy
Asked:
dentonsy
  • 8
  • 5
  • 3
  • +3
2 Solutions
 
trevorhartmanCommented:
this seemed to work for me:

function setsize(w,h) {
window.scrollTo(0,0);
window.resizeTo(w,h);
}

not sure why its giving an access denied.  could just be a bug

-Trevor
0
 
ZylochCommented:
Hi

Maybe it's described in this article: http://computercops.biz/article4144.html even though I'd be thinking it's already fixed.

Regards,
Zyloch
0
 
ziffgoneCommented:
I think Zyloch is right, looks like a bug in IE that will need to be fixed via a patch from Microsoft.

Trevor, still didn't fix it, if you move the scrollbars before using the select box, it still outputs the error.

Regards...
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
davidlars99Commented:
hi,

when you're using IE at the and of the function use
return false;

in Netscape use
return true;

like this:

window.resizeTo(350,450);
return false

cheers!
 dave
0
 
a_twixt_in_the_taleCommented:
No problem here too...
Try a lil delay bfr calling setsize(600,400) using setTimeout

:)
Don
0
 
dentonsyAuthor Commented:
The solution scrollTo and "return false" still doesn't fix the problem. I tried the setTimeout method but it just delayed the "Access is denied" error.

Don, can you post your exact solution (codes) here? Thanks.
0
 
davidlars99Commented:
hi, looks like you are not the only one who has the same problem, you need to update
url.dll and Shlwapi.dll, so I found the appropriate link here:

http://www.microsoft.com/technet/security/Bulletin/MS03-048.mspx that should do id



Affected Components:

• Internet Explorer 6 Service Pack 1: Download the update.
 
• Internet Explorer 6 Service Pack 1 (64-Bit Edition): Download the update.
 
• Internet Explorer 6 Service Pack 1 for Windows Server 2003: Download the update.
 
• Internet Explorer 6 Service Pack 1 for Windows Server 2003 (64-Bit Edition): Download the update.
 
• Internet Explorer 6: Download the update.
 
• Internet Explorer 5.5 Service Pack 2: Download the update.
 
• Internet Explorer 5.01 Service Pack 4: Download the update.
 
• Internet Explorer 5.01 Service Pack 3: Download the update.
 
• Internet Explorer 5.01 Service Pack 2: Download the update.
 

cheers!
 dave
0
 
dentonsyAuthor Commented:
Thanks for the link, Dave. But I don't think the .exe files are working. My IE version is 6.0.2800.1106 and this corresponds to the SP1 download. But upon executing the downloaded exe file, it says "This update requires IE 6 SP 1 to be installed." It's happening both in my computer at home and at office... Have you tried installing the patch?
0
 
davidlars99Commented:
actualy I have never had such a problem before... I was just following my insticts to assist you... you did not try these updates did you? that update was issued in early 2004, some people still have updates that are outdated and surprisingly they are all in SP1
0
 
ZylochCommented:
Well, my IE version is this: 6.0.2800.1106.xpsp2.030422-1633
0
 
dentonsyAuthor Commented:
Exactly the same as mine. Have you tried installing the patch, Zyloch?
0
 
davidlars99Commented:
let's check Update Versions, mine is:

Q837009; Q832894; Q81167; Q823353; Q867801
0
 
davidlars99Commented:


if you don't have Q867801 you MUST install this:

http://www.microsoft.com/technet/security/bulletin/ms04-025.mspx
0
 
davidlars99Commented:
to see what they represent go to this website and check all of them by putting them into search box

http://search.microsoft.com/search/results.aspx?view=en-us&st=b&na=82&qu=Update+version+Q867801
0
 
davidlars99Commented:
updates are same as Patches. here check this out this is the site for latest IE Patch

http://www.nwfusion.com/news/2004/0730mspatch.html

if you look down on this site you'll see a link:
Advertisement: The patch is available here.

you click that link and it' will take you to the Microsoft website to the Q867801 which is the same that I provided in the above comment, but anyway, if you install this patch and realize it did not solve your issue, I would recommend to install all the updates (Q837009; Q832894; Q81167; Q823353; Q867801) to find out where they are follow my link posted in comment: Date: 08/12/2004 06:28AM PDT

cheers!
 dave



0
 
davidlars99Commented:
I would also reccommend to turn on windows automatic updates, in couple of days windows XX SP2 will become available and you don't wanna miss it
http://www.microsoft.com/athome/security/protect/default.aspx
0
 
dentonsyAuthor Commented:
My Update Versions are currently: SP1; Q330994; Q824145; Q832894; Q837009; Q831167; Q823353; Q867801

But the "Access is denied" error still persists. This is not happening in any other browsers. I guess IE just messed it up with its own fixes ;)
0
 
ZylochCommented:
A perfect reason to scrap IE and migrate to another browser :) [now if we could only convince the general community of that...]

I mean, besides the fact that the blue of IE is really getting to me.
0
 
dentonsyAuthor Commented:
Well, I guess there's no solution with IE... so I'll just split up the points between Zyloch and David.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

  • 8
  • 5
  • 3
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now