Solved

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

Posted on 2004-08-10
19
1,508 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
  • 8
  • 5
  • 3
  • +3
19 Comments
 
LVL 8

Expert Comment

by:trevorhartman
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 13

Expert Comment

by:davidlars99
Comment Utility
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
Comment Utility
No problem here too...
Try a lil delay bfr calling setsize(600,400) using setTimeout

:)
Don
0
 

Author Comment

by:dentonsy
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 36

Expert Comment

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

Author Comment

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

Expert Comment

by:davidlars99
Comment Utility
let's check Update Versions, mine is:

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

Expert Comment

by:davidlars99
Comment Utility


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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Well, I guess there's no solution with IE... so I'll just split up the points between Zyloch and David.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
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…

771 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now