Solved

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

Posted on 2004-08-10
19
1,545 Views
Last Modified: 2008-01-09
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
Comment
Question by:dentonsy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 5
  • 3
  • +3
19 Comments
 
LVL 8

Expert Comment

by:trevorhartman
ID: 11768380
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
 
LVL 36

Accepted Solution

by:
Zyloch earned 250 total points
ID: 11768394
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
 
LVL 14

Expert Comment

by:ziffgone
ID: 11768474
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 13

Expert Comment

by:davidlars99
ID: 11768574
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
 
LVL 8

Expert Comment

by:a_twixt_in_the_tale
ID: 11770100
No problem here too...
Try a lil delay bfr calling setsize(600,400) using setTimeout

:)
Don
0
 

Author Comment

by:dentonsy
ID: 11773128
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
 
LVL 13

Assisted Solution

by:davidlars99
davidlars99 earned 250 total points
ID: 11774306
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
 

Author Comment

by:dentonsy
ID: 11780276
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
 
LVL 13

Expert Comment

by:davidlars99
ID: 11780303
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
 
LVL 36

Expert Comment

by:Zyloch
ID: 11780641
Well, my IE version is this: 6.0.2800.1106.xpsp2.030422-1633
0
 

Author Comment

by:dentonsy
ID: 11783357
Exactly the same as mine. Have you tried installing the patch, Zyloch?
0
 
LVL 13

Expert Comment

by:davidlars99
ID: 11783452
let's check Update Versions, mine is:

Q837009; Q832894; Q81167; Q823353; Q867801
0
 
LVL 13

Expert Comment

by:davidlars99
ID: 11783506


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

http://www.microsoft.com/technet/security/bulletin/ms04-025.mspx
0
 
LVL 13

Expert Comment

by:davidlars99
ID: 11783537
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
 
LVL 13

Expert Comment

by:davidlars99
ID: 11783717
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
 
LVL 13

Expert Comment

by:davidlars99
ID: 11783852
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
 

Author Comment

by:dentonsy
ID: 11804536
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
 
LVL 36

Expert Comment

by:Zyloch
ID: 11862076
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
 

Author Comment

by:dentonsy
ID: 11888796
Well, I guess there's no solution with IE... so I'll just split up the points between Zyloch and David.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses
Course of the Month11 days, 15 hours left to enroll

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question