Click to See Complete Forum and Search --> : Javascript error


February 21st, 2000, 07:06 AM
Hi all,

I know this is not the right place to put up a javascript problem, but i thought if anyone can help on this i'd be highly obliged. The following code gives me a "Object required" error. Netscape says "add" not found.



<HTML>
<HEAD>
<TITLE>
Try table
</TITLE>
<SCRIPT LANGUAGE="JavaScript">
var rowCtr = 0

function add()
{
rowCtr++
alert("rowCtr:" + rowCtr)
writefn()
}


function writefn() {
alert("in write")
document.clear()
document.write('<form><input type="button" name="add" value="+" onClick="add()"></form>')
}

</SCRIPT>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript">
writefn()
</SCRIPT>
</BODY>
</HTML>


Please help!!!