Solved

On Error Resume Next

Posted on 2002-04-03
6
429 Views
Last Modified: 2008-02-26
I need the equivalent for "On Error Resume Next" statement in JavaScript.
0
Comment
Question by:smilitaru
[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
  • 3
  • 2
6 Comments
 
LVL 3

Accepted Solution

by:
tejaspurani earned 50 total points
ID: 6916000

Try This


<html>
<head>
<title>simple javascript error</title>
<meta http-equiv="Content-Type"
     content="text/html; charset=US-ASCII">
<script type="text/javascript">
<!-- //

function handleError() {
     return true;
}

window.onerror = handleError;
//-->
</script>


</head>
<body onload="doesnotexist()">

</body>
</html>
0
 
LVL 3

Expert Comment

by:tejaspurani
ID: 6916029
send the page what u want to do.
The above function will handle error without popup box
but not resume next.

TP
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 6916045
IE5+ and NS6 understands

try {
   something
}
catch (e) {
}

http://developer.netscape.com/docs/manuals/js/core/jsguide15/stmtsov.html#1012168
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 3

Expert Comment

by:tejaspurani
ID: 6916060
If the function returns true then nothing further happens, if the function returns false then the normal JavaScript error reporting occurs.Which we can handle by  window.onerror = handleError;

It is not possible to resume.

But If we can get the ieda what you need to we can certainly try to do something.

TP

0
 
LVL 7

Author Comment

by:smilitaru
ID: 6917624
I will give the same amount of points both to tejaspurani  and mplungjan.
Both answers helped me.

mplungjan
Please answer to the new question for you.

Best Regards
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 6917628
Thanks
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
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

631 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