• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 295
  • Last Modified:

Stop reporting javascript errors to end user

Setup:
Running IIS on Windows 2003
Running multiple different sites
1 site is a basic java script page, it runs fine on its own
1 site runs the previous site inside its pages, errors are generated and end user has to click ok to continue
errors do not stop functionality

i am not interesting in fixing the problem, even the manufacturer says its un supported.

Goal: My goal is to modify my IIS settings in such a way where the errors won't be delivered to the end user.

i 'think' this can be done based on the settings i've seen in IIS, however i do not 'know' if this can be done, or how to.

Thanks for the help
0
funnymanmike
Asked:
funnymanmike
  • 5
  • 4
  • 2
  • +2
2 Solutions
 
ChetOS82Commented:
JavaScript is a client-side scripting language.  Those errors cannot be disabled from the server.  Users can modify their Internet Explorer/Firefox settings so that the dialog box doesn't pop up, but they will still be notified by an icon at the lower corner.

What errors are generated?
0
 
funnymanmikeAuthor Commented:
thats the problem though, beacuse site1 is being loaded into site2, the notification does not go in the lower corner. it is ignoring all the rules.

g_objXMLTempData.documentElement is null or not an object, Code 0,
is the error
0
 
ChetOS82Commented:
The long and short of it is that you cannot prevent the error dialog by changing a setting on the server.

What do you mean by "site1 is being loaded into site2"?  Are you talking about an iframe, or some sort of server-side merge?

That error means that g_objXMLTempData is not available.  Perhaps you are trying to access it on site2, even though it only exists in site1?  Just a guess.
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
funnymanmikeAuthor Commented:
its hard to explain, basically the primary site is just a CRM, it can load custom 'tabs' that we point to other sites, ie google and what not. well site2 is a part of the crm that just shows who is all logged into the crm.

both work fine independently, once we add this status page as a tab, it generates these error as something someone has to click on. if the primary crm generates an error, it just shows up in the bottom corner like normal.

both are located on the same server

manufacture has washed their hands of it saying its not them.
0
 
b0lsc0ttCommented:
funnymanmike,

So where is that error showing?  Can you upload a screenshot?  Can we see code for the line and section reported in the error and code for the object that is mentioned?

The expert above is correct though.  The server doesn't run Javascript.  If it really is Javascript or other clientside script then it is the browser showing the error and you won't be able to control how that is done.  If you can modify the code and it is related to just one block of code you might consider a try/catch block to "catch" the error.  Basically this would make it so you could have nothing show if there is an error or problem with that section of script.  In situations where you know your code may not be supported or will cause an error this method is the way to properly handle it so the user sees what you want.  Let me know if you need details on using try/catch but there is a nice, simple example at http://www.w3schools.com/js/js_try_catch.asp .

Let me know if you have any questions or need more information.

b0lsc0tt
0
 
funnymanmikeAuthor Commented:
error is a java script pop up
cannot show any code for this

i saw spots in IIS that talked about errors though.

let me review the link and check the code. i will also try and get a screenshot.
0
 
b0lsc0ttCommented:
The spots in IIS that would talk about errors would be HTTP errors.  They would show in a web page.  If it is a popup like an alert then that is clientside and nothing the server can prevent.  Preventing the error message would need to be done in Javascript code or in the browser's settings (which just the user can change).
If you can't provide code then we can't confirm or help fix this but you might still try to use the try/catch to stop the message, if it is just one part causing it.  All credit to the expert above though for answering the part that IIS can't stop Javascript errors.
bol
0
 
funnymanmikeAuthor Commented:
execute permissions
 - configurations
 - Debugging

that's where i was looking at.
0
 
b0lsc0ttCommented:
OK.  Thanks for clarifying the settings.  Unfortunately that area and those settings are still for debugging script processed by IIS.  Clientside Javascript (i.e. script in a js file, in the <script> tags, or in an html tag's event) is not processed by IIS so would not be affected by those settings.  In some cases those should not be enabled without serious consideration because they will add to the server overhead.  In other words might be OK on a development machine when you need the debugging info and might even want it sent to the client (i.e. VisualStudio) but not something that would be enabled and used on a production server.
I hope this helps explain those options but unless you are wrong about the type of script those settings will not help.  Have you looked at try/catch?  Let us know if you have a question.
bol
0
 
b0lsc0ttCommented:
Please explain why you closed this as you did with the grade and accepting just the one comment.  Let me know if there was a mistake or you weren't aware you could split the points and credit but this would seem to be a question where there was more than one contributor and it also seems to be completely answered.  If it was a mistake then let me know and I can help correct it.  Otherwise please post to explain how this turned out and why you closed it as you did.
bol
0
 
LunchyCommented:
funnymanmike,  
 
b0lsc0tt has asked (http://www.experts-exchange.com/Q_23932926.html) for an explanation of why you selected the
answer(s) you selected for this question.
 
Please indicate your reasoning within the next four days.  I or another Moderator will check
back in about four days, at which time we expect to see your explanation.
 
To other participating Experts: please leave your recommendations as well.
 
After reviewing the explanation and other recommendations, the Moderator may decide to
change the award for the question.
 
Thank you,  
 
Lunchy
Friendly Neighbourhood Community Support Moderator
0
 
Vee_ModCommented:
No Response to Expert and/or Moderator.
Force closed.
 
Vee_Mod
Experts Exchange Moderator

http:#a22953166
http:#a22955543
0
 
funnymanmikeAuthor Commented:
how can i even tell what i maked this as?

and why do i have to defend my opinion for a website i pay 15$ a month for?
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

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