<html>
<head>
<script type="text/javascript">
function gethelp(txt1)
{
try
{
var al
if(document.getElementById('raw').value == txt1)
{
document.write(txt1)
}
}
catch(err)
{
al = err.description
alert(al)
}
}
</script>
</head>
<body >
<table>
<tr ><td onclick="gethelp('hello')" id="one" >hi</td></tr>
<tr><td id="raw">hello</td></tr></table>
</body >
</html>
The above underlined java script code does not work. Am I doing anything wrong. Thanks in advance
<head>
<script type="text/javascript">
function gethelp(txt1)
{
try
{
var al
if(document.getElementById('raw').value == txt1)
{
document.write(txt1)
}
}
catch(err)
{
al = err.description
alert(al)
}
}
</script>
</head>
<body >
<table>
<tr ><td onclick="gethelp('hello')" id="one" >hi</td></tr>
<tr><td id="raw">hello</td></tr></table>
</body >
</html>
The above underlined java script code does not work. Am I doing anything wrong. Thanks in advance