Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error handling

 
joy thomas
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
kindly check what is the error in the following code..


try
{
adddlert("Welcome");
}
catch(err)
{
txt="There was an error on this page.\n\n";
txt+="Click OK to continue viewing this page,\n";
txt+="or Cancel to return to the home page.\n\n";
if(!confirm(txt))
{
document.location.href=www.move.com;
}
}
}
</script>
</head>

<body>
<input type="button" value="View message" onclick="message()" />
</body>

</html>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic