Question

Internet Explorer Script Error Dialog

Asked by: LilMoke

Hello,

Does anyone know how i can supress the "Internet Explorer Script Error" dialog?

I have an MFC DHTML dialog, but when I go some pages that have script errors a dialog popups up.  I want to supress those dialogs.

Any help would be greatly appreciated.

Tony

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2004-02-25 at 18:19:59ID20898289
Tags

script

,

error

Topics

Miscellaneous Programming

,

Windows Batch Scripting

Participating Experts
5
Points
250
Comments
22

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. DHTML
    What's DHTML and if I don't know HTML, do I need to learn HTML when I leart DHTML? Could you tell me some good web sites for learning HTML, DHTML and JavaScript ?
  2. DHTML Dialog Box
    Hi. 1. Is there anyway to get rid of the ' -- Web Page Dialog' suffix in my dialogs? 2. How can I get better control over these dialog windows? I want to do stuff like: disable the minimize button. mark a control as 'not a tab stop', that kind of stuff.
  3. Mfc Dialog-App activating HtmlHelp: ok from Explorer, fa…
    Mfc Dialog-App activating HtmHelp: ok from Explorer, fails in VisStudio I've got an Mfc generated Dialog App with a menu and various controls. I want to use HtmlHelp, and am having a strange problem with "Help + Topics" and "Help + Index" I compile/...
  4. DHTML Dialog
    Hi all, C++ offers a new type of dialog called a DHTML dialog, which mixes a hosted browser with some native XP controls. It looks really great. Are there any samples for doing the same thing with .NET (C# or VB.NET). Thanks Regards Craig.
  5. supress dialog boxes
    hello,I have a doubt.I have written a macro to delete a particular worksheet ,but I don't want the dialog box that pops up "do u want to delete the file"etc while I run the macro.So how can I supress the arning dialog box? Thanks, Deepa
  6. Minimize MFC Dialog
    I want to minimize an MFC dialog at some point of my program and I want it to stay minimized at all times until the end of the program. The dialog can't be visible except on the taskbar. When it's minimized, I want it so the program's icon shows up in the taskbar and the us...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: mikecurry74Posted on 2004-02-25 at 19:22:53ID: 10456785

Disable Script debugging in the advanced tab in Tools > Internet Options... as well as a few others (you'll see them)

 

by: LilMokePosted on 2004-02-25 at 19:28:51ID: 10456816

I did that already but they still come up.  I checked "Disable script debugging" and I unchecked "Display a notificatin about every script error" but they still show up.

Tony

 

by: ryancysPosted on 2004-02-25 at 21:02:48ID: 10457338

It will be nicer if you can resolve your script problem in your HTML rather than disable any debugging tools, it's because your front-end users somewhere else may face the same problem as you facing now. Try open your sourcecode and debug where the error comes from.

regards

 

by: DanRollinsPosted on 2004-02-25 at 23:55:34ID: 10458043

here,  http://msdn.microsoft.com/library/en-us/dnscrpt/html/WebErrors2.asp
it says
> (note that checking the Disable script debugging setting will apply only to that instance of Internet Explorer):

So that appears to be a per-instance setting.  You would need to set it in your browser instance.  It looks like you might need to add a window.onerror handler (I've never done that).

Aee if you can find this setting:
    Automatically enable ASP server-side debugging on launch
in VS 7 and turn it off.

-- Dan

P.S. as  ryancys said, it's best to just fix the errors :)

 

by: LilMokePosted on 2004-02-26 at 06:05:13ID: 10460166

Ok, well, this is not my html, script code.  It is certain sites that my users navigate to.  Although it would be nice to fix the web's script issues everywhere, i think is out of my hands.

To be kinder, gentler on my users i wanted to supress that diaog.

 

by: schumakersPosted on 2004-02-26 at 13:08:42ID: 10463918

Go into regedit and Modify the Disable Script Debugger key to say "yes" without the quotes.  It is located in a couple of locations.
One is for the current user and one for default profiles (Used when new users log on the the computer).  If you already have user profiles already on the computer there are more entries in the HKEY_USERS\S-#-#-##\Software\Microsoft\Internet Explorer\Main.   The # signs are replaced with numbers.  
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main

HKEY_USERS\.DEFAULT\Software\Microsoft\Internet Explorer\Main

These should fix the problem.

 

by: LilMokePosted on 2004-02-26 at 13:18:47ID: 10464017

I have searched the entire registry for "Disable Script Debugger" and changed everywhere to "yes" without the quotes and they still show up.  I do not understand what it is about this script error dialog, but i cannot seem to get rid of them popping up... guess this is a hard one, maybe this should be worth 1000 points!!!!

Tony

 

by: schumakersPosted on 2004-02-26 at 13:18:58ID: 10464018

If you have Visual Studio 6.0 installed on a computer you would need to do the following:

This is an answer from a previous question:
In Microsoft Visual InterDev, go to Tools > Options and then "Debugger".
Un-check "Attach to programs running on this machine" in the Script section.

 

by: DanRollinsPosted on 2004-02-26 at 14:39:06ID: 10464779

Also, try running the program on a computer that does not hae VisualStudio installed.  That could eliminate or confirm that it is related to debugging options set on your dev environment.
-- Dan

 

by: LilMokePosted on 2004-02-27 at 08:53:20ID: 10470722

Dan,

Someone I know at MS told me that the script error dialog will not get suppressed because it has a yes and no button that need user interaction.  He said the only dialogs that get suppressed are error dialogs that are informational and have only one button. However, he could not confirm this to be true as of yet.

This sort of makes sense, what do you think?  Can you confirm if this is true?

Thanks,
Tony

 

by: schumakersPosted on 2004-02-27 at 09:17:18ID: 10470897

That is not true because all Script debugger messages ask if you want to debug them(yes) or not(no).  They can be disabled.  I have done it here at our business.  Changing those registry values should have fixed it, as long as you don't have Visual Studio installed or some other related program that compiles scripts.  

 

by: ryancysPosted on 2004-02-27 at 17:42:37ID: 10474066

Frankly to say, you STILL need to solve the source where the error comes from.To deployed the application with buggy is NOT always the best choice. Your users will definitely come back to you if they seeing same problem as you're facing now. You may contact the script developer to resolve the problem.

regards

 

by: LilMokePosted on 2004-02-27 at 17:49:56ID: 10474096

ryancys,

As I said before these are OTHER sites, this problem exists with standard IE, my app or netscape.  The authors of the commercial sites have errors in their code.  Like I said earlier it would be wonderful for ALL sites to be perfect, but it is out of the control of my app.

I am glad you are a purist and do not like to ship buggy code, but I do not wish to either.  My code DOES NOT have a a bug, it is the sites we are going to.  SO, to make my app nicer to users I was hoping I could find a way to disable the dialog.

I guess I have stumped alot of people and came across a problem that may not have a solution.  Even the MS folks I have spoken with so far say to set the options, but it simply does not seem to work.

Thanks,
Tony

 

by: LilMokePosted on 2004-02-28 at 20:23:31ID: 10478845

Dan,

You may have an answer to this one...  I took part of a page that causes a script error, i can send it if you like. But in any event, I have an IE/HTML based app.  If I open the html file in IE with the check boxes as talked about by all it does not display an error.  BUT, in my app and the Microsoft, MFCIE Sample App, the script errors appear.

So, my conclusion is that the IE OCX does not abide by the internet options you can set in IE.  Do you know how, or if, similiar options can be set in the MFCIE App, or my app.

Maybe this find will give some clues to all that have tried to answer, i guess this is really hard so I will up it 1000 points!!!!   Seems like a thing to do, since this has been round and round for a bit!!

Plus I really appreciate the help in uncovering the mystery!!

Tony

 

by: DanRollinsPosted on 2004-02-29 at 11:53:41ID: 10481680

About 1,000,000 other people seem to be having a similar problem!
Here is a google groups search...
    http://groups.google.com/groups?q=%22Disable+Script+Debugger%22&

Here is what Microsoft has to say:
    http://support.microsoft.com/default.aspx?scid=KB;EN-US;q305389

The only people who offer a working solution describe how they had to change a registry setting (well, actually teo registry settings).  Here is one solution that shows complete VB coding:
    http://groups.google.com/groups?selm=eCOgBrt%23AHA.1852%40tkmsftngp05&rnum=6

At the bottom the poster briefly describes a different 'last resort' solution:  He loads the HTML separately and feeds it into the browser.  I suppose that would bypass the JIT (just in time) debugger's logic for (I'm guessing) installing an onerror handler.

Another thread gave me this idea:  
Sink the "Download complete" event in your control.  That will let you know if the popup occurs before or after that event.  It might be possible to add a 'window.onerror' handler of your own at that point.

Post the URL of a page that causes the problem, and I'll take a stab at winning the 1000 points.

-- Dan

 

by: LilMokePosted on 2004-02-29 at 12:09:43ID: 10481751

Dan, I do not have an url, but i do have a script line that produces a script error that i have used for testing... I have been looking at IHTMLWindow2 methods, they do have an onerror.  I am not sure at this point how to get that event, but if you can help there, that may be a solution.

Search for DISPID_HTMLWINDOWEVENTS2_ONERROR, OLECMDID_SHOWSCRIPTERROR and Q261003.

If you think that may work, help in how to implement it would be appreciated...

Thanks,
Tony

 

by: DanRollinsPosted on 2004-02-29 at 12:49:10ID: 10481933

I guess then that you've seen this:
 
     HOWTO: Handle Script Errors as a WebBrowser Control Host
     http://support.microsoft.com/default.aspx?scid=kb;en-us;261003

and the many links here:

     http://support.microsoft.com/common/canned.aspx?R=D&H=IE%20Programming%20WebBrowser%20Frequently%20Asked%20Questions&LL=kbIEsearch&SZ=kbWebBrowser

I have not re-installed VS7, so I can't experiemet with an MFC DHTML dialog right now.  But I'll look into how that code provided in the first link above can be applied to your situation later tonight or tomorrow.

-- Dan

 

by: LilMokePosted on 2004-02-29 at 12:51:35ID: 10481947

I am on this path now...  

      MSHTML::IHTMLDocument2Ptr pMainDoc= this->GetHtmlDocument();
      _variant_t varFO =  CFunctionObject<CMfcieView>::CreateEventFunctionObject(this, OnErrorCallback, 0);

      MSHTML::IHTMLWindow2Ptr pWin;
      pMainDoc->get_parentWindow(&pWin);

      MSHTML::IHTMLWindow2Ptr pParentWin;
      pWin->get_parent(&pParentWin);

      HRESULT hr = pWin->put_onerror(varFO);

I will test it soon...

 

by: LilMokePosted on 2004-03-02 at 11:13:57ID: 10497997

Dan,

You were going to look into a few things... let me tell you where i'm at...  I have put this code in my OnDocumentComplete:        MSHTML::IHTMLDocument2Ptr pDoc= GetMainWnd()->m_BrowserControlTop->GetHtmlDocument();
if (pDoc)
{
      _variant_t varFO =  CFunctionObject<CIEHtmlViewMain>::CreateEventFunctionObject(this, nErrorCallback, 0);
      MSHTML::IHTMLWindow2Ptr pWin;
      pDoc->get_parentWindow(&pWin);
      MSHTML::IHTMLWindow2Ptr pParentWin;
      pWin->get_parent(&pParentWin);
      HRESULT hr = pWin->put_onerror(varFO);
}

AND, added the following function:

void CIEHtmlViewMain::OnErrorCallback(DISPID id, VARIANT* pVarResult)
{
      TRACE("SCRIPT ERROR\n");
      (*pVarResult).vt = VT_BOOL;
      (*pVarResult).boolVal = VARIANT_TRUE;
}


But, it does not appear to ALWAYS get called.  Any ideas why?  I think I am on the something to catch these script errors, but it does not always seem to work.

Any help would be appreciated as this is a veri frustrating... and obviously, difficult problem!!

Thanks,
Tony

 

by: DanRollinsPosted on 2004-03-02 at 11:29:34ID: 10498181

It looks like that should work... you are adding an onerror handler for the window.  The fact that it works some of the time is very good news.

If I could see the source of a webpage in which it did *not* work, I could get some ideas.  For instance, what if the page already has an onerror handler?  Perhaps you need to first delete any existing onerror handler.

Another thing... some "pages" are really frames containing multiple pages.   This technique might fail in that situation because you have not created an onerror handler for each page.

Another thing... A page can open an external window.  This technique might fail in that situation because you have not created an onerror handler for each new popup window.

=-=-=-=-=-=-=-=-=
One final note:  
You might be putting more into this than is needed.  As far as I know, most users do *not* run with debugging enabled.   The popup error message will only affect those who do web page debugging.  And they won't mind it because they are used to it and expect the popups.  That same group won't blame your program, but will know that the error is the fault of whoever designed the page they are browsing.  Worth thinking about....

 

by: JRtechPosted on 2004-09-13 at 12:10:47ID: 12047553

Until this weekend, when my Just-in-time Debugger window would pop up, if I already had an instance of Visual Studio .NET open, then that was the default.  For some unknown reason, this Friday, that got changed to "New instance of Microsoft Script Debugger".  I am able to change the default to "New instance of Visual Studio .NET" but I do not see how to change the default to use the existing VS.NET.

Does anyone have any ideas on how to get the default set to use the existing VS.NET instance?

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...