logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > Javascript and JS frameworks
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 01-07-2009, 06:53 PM   #1
LoveLeather
 
Join Date: Jun 2007
Posts: 80
Default Error messages

Does anyone know what this code would be used for?

<script type="text/javascript">
function stoperror(){return true}
window.onerror = stoperror
</script>
LoveLeather is offline   Reply With Quote
Old 01-11-2009, 07:30 AM   #2
ranjan
 
Join Date: Dec 2004
Posts: 405
Default

window.onerror --> when a javascript error is triggered
stoperror --> perform the function stoperror()
function stoperror(){return true} --> function purges javascript errors

This means users will not see any javascript errors.

Usually when javascript errors occur the execution of the script stops, be aware of that if you use the above
ranjan is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:04 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com