<html>
<head>
<script language="javascript">
function handleError(){
try{
document.writes("JavaScript Examples");
}catch(exception){
err=exception + "\n";
err+=exception.description + " Error\n";
err+="There is an error at this page.\n";
err+="Click OK to continue viewing this page,\n";
err+="or Cancel to return to the JavaScript Examples page.\n";
if(!confirm(err)){
document.location.href="
http://www.TechnicalTalk.net/";
}
}
}
</script>
</head>
<body>
<input type="button" value="Click to Handle Errors" onclick="handleError()">
</body>
</html>
This code does not sound like catching the CTRL+C.
This code is for catching the exception and how one can use the exception object to display the error message. [Handling the exception]
Please read the thread carefully and then post your reply.