ibjdt
Programmer
- Nov 25, 2002
- 63
i an using (or want to use) a js script to sort a table created by a perl cgi script.
the js script requires an onload in the body tag
then the table is id'd as table0
i create the table contents with perl
print the header to the screen
print the table
print the footer
when the cgi page loads, i get a js error
the line reference is the body tag where the onload is.
any ideas?? if i copy the source from the error'd page, i can save it as an html page and it works fine.
thanks for the help.
the js script requires an onload in the body tag
Code:
onload='initTable("table0");'
then the table is id'd as table0
Code:
<table border="1" cellspacing="2" cellpadding="2" width=100% ID="table0">
i create the table contents with perl
print the header to the screen
Code:
<HTML>
<HEAD>
<link href="../../../styles.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY onLoad='initTable("table0");' BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080">
<SCRIPT SRC="sortTable.js">
</SCRIPT>
<CENTER>
<img src="../../../banner.gif" width="724" height="86"><br></center>
print the table
print the footer
when the cgi page loads, i get a js error
Code:
object expected (code 0)
the line reference is the body tag where the onload is.
any ideas?? if i copy the source from the error'd page, i can save it as an html page and it works fine.
thanks for the help.