ignore javascript error

hello there
i am trying to run javascript on asp.net page but i am getting object undefined error and i want to ignore this, please can someone advise how can i go about fixing this?
thanks
c
LVL 6
charlie324Asked:
Who is Participating?
 
newbie27Commented:
hi,
use try and catch block

try this

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
  
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<title></title> 
<script type="text/javascript"><!-- 
function tip() 
{ 
        try 
        { 
                tt_tip(arguments,null); 
        } 
        catch(e){} 
} 
//--></script> 
</head> 
<body> 
<div onclick="tip()">Click me</div> 
</body> 
</html>

Open in new window

0
 
charlie324Author Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.