This is a section of the code from my perl script...I wanted to pass the value to a javascript depending on the row clicked. The results gets displayed properly based on the query but the javascript seems to get an undefiened value back when I use the function like this:
while (@returnval = $sth->fetchrow_array())
{
print "<table border=1 align=center width='100%'>\n";
print "<TR onclick='sendDataToParent(@returnval);'><TD>@returnval</TD></TR>\n";
print "</table>\n";
}
Can someone help me how to write javascripts within the print of perl script. Thanks
while (@returnval = $sth->fetchrow_array())
{
print "<table border=1 align=center width='100%'>\n";
print "<TR onclick='sendDataToParent(@returnval);'><TD>@returnval</TD></TR>\n";
print "</table>\n";
}
Can someone help me how to write javascripts within the print of perl script. Thanks