Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

On Error Resume Next

Posted on 2002-04-03
6
Medium Priority
?
431 Views
Last Modified: 2008-02-26
I need the equivalent for "On Error Resume Next" statement in JavaScript.
0
Comment
Question by:smilitaru
  • 3
  • 2
6 Comments
 
LVL 3

Accepted Solution

by:
tejaspurani earned 200 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
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 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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

971 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