Click to See Complete Forum and Search --> : Help with Java Script method


meenu24
05-05-2006, 10:12 AM
<html>
<body>
<script>
function show(getter)
{
try
{
var al
document.getElementById('raw').value = getter
}
catch(err)
{
al = err.description
alert(al)
}
}
</script>
<table>
<tr>
<td id="raw" onclick="show('verygood')">correct</td>
</tr>
</table>
</body>
</html>

When I click the row with id="raw" , I see no chnage in its value. But html file gives no erro on java script. ANy suggestions on this.

Thanks

Master Shake
05-05-2006, 10:33 AM
change this:
document.getElementById('raw').value = getter
to this:
document.getElementById('raw').innerHTML = getter

Master Shake

meenu24
05-05-2006, 10:45 AM
Thanskyou very much. It worked.

regards