Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Internet Explorer crashes when using a modal dialog

Posted on 2005-04-09
7
Medium Priority
?
535 Views
Last Modified: 2008-03-03
I have an application that uses several modal dialogs (showModalDialog) for various features in a page editor. I've been experiencing that when you do too many things within a dialog it will crash IE. One dialog, for example, allows you to upload images and set various image attributes. When you click the save button on the dialog the window is dismissed and the image is placed on the web page. However, if you open the dialog and try to upload more than two images it will crash. Other dialogs also have similar issues. If you open a dialog and make only a limited number of changes then dismiss the dialog it works fine. But when you try to do several things at once within the open dialog it will eventually crash.

Is this possibly something wrong with my code in the dialog, or is there some buffer to do with scripting in IE that is getting overloaded, or just a bug in IE that is causing it to crash?
0
Comment
Question by:danburyit
  • 4
  • 3
7 Comments
 
LVL 22

Expert Comment

by:RedKelvin
ID: 13749591
Do you have any other issues with IE, that would suggest there is something wrong with it? Is it normally unstable when used stand alone.

The first thing you should do is make sure you have all of the Microsoft updates for IE6, there has been many.

If this does not seem to help, try the following.

1. Uninstall IE6
2. Run a registry cleaner to clean up any keys that may have been left behind.
3. reinstall IE.

Other suggestions/thoughts
Is your system running out of resources, are you pushing to it's limit?
Have you defragged recently?
Have you run a virus and adware scan recently?
0
 
LVL 1

Author Comment

by:danburyit
ID: 13765498
All of the suggestions in the previous post do sound like good points; however, IE is all up to date on the patches, I have no viruses, plenty of system resources, etc. The crashing behaviour is very consistent on several comuters. As with the image upload, you can upload two images and on the third IE will crash. It seems to be something specific with the dialogs. Is there a limited amount of memory space allocated for client-side javascript code that crashes the browser if used up?? This seems more to be a bug or some issue with IE. Who do you tell?
0
 
LVL 22

Expert Comment

by:RedKelvin
ID: 13768130
Could you give me some information about what technologies you are using.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 22

Expert Comment

by:RedKelvin
ID: 13768153
You mentioned specifically that this is happening with a modal dialog, does it happen with modeless dialogs

are you freeing all resources after using them.
0
 
LVL 1

Author Comment

by:danburyit
ID: 13774959
I am using IE 6.whateveriscurrent on a Windows XP SP2 box and the problem seems to be occurring as a result of client-side javascript in the modal dialog. I don't know what a modeless would do but I can't imagine it would be much different. I suppose it would be easy enough to try. I expect if the problem didn't occur in a modeless dialog that it must be some issue with modal dialogs which brings me back to "who at Microsoft do you tell about it?"

I suppose I pay more attention to nulling objects in my server side code (I use javascript server-side also) like connection strings and recordsets. However, I do use some objects in the client code, like arrays and objects. I will scan over the code and make sure they are all nulled out after they are used as well and see if that makes any difference.
0
 
LVL 22

Accepted Solution

by:
RedKelvin earned 1500 total points
ID: 13777778
Whenever I get stuck with something I have written, and I get a problem that cannot be explained, such as this one. What I do is simplify my code as much as possible, then run it to prove it will not crash, then readd the code until it crashes. This usually narrows down the problem quite effectively.

Good luck
0
 
LVL 1

Author Comment

by:danburyit
ID: 13793162
Well, I followed the advice above and found the culprit. Whenever an image is chosen for upload by clicking the 'browse' button and choosing a file, the image is displayed in a preview panel on the modal dialog and resized to fit if necessary. Whenever an image is selected, the clearAttributes() method is called on the image object to remove any height and width values that may have belonged to a previously displayed image. It is the clearAttributes() method that is causing the crash. I take it out and no crashing. I put it back and it crashes on the third or fourth image displayed.

Now I just need to clear those values by some other means so every image displayed in the preview isn't forced to the same size as the first image displayed. Using a removeAttribute() for each of the height and width attributes seems to work only about 90% of the time.

Thanks
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses
Course of the Month11 days, 12 hours left to enroll

564 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