[thelist] help with JS error

Bruce Gilbert webguync at gmail.com
Thu Jun 14 14:28:28 CDT 2007


I am trying to show/hide a table row extracting from a MySQL database using
a unique ID. I have the PHP/MySQL part working correctly, but I get an
undefined..JS error, so something is amiss...the page in Question is
http://www.carrentalsupport.com/bruce/Query.php, and if you click on 'more
info. you will get the error. What is supposed to happen is a row is
supposed to appear and dissapear.

My PHP is :

//row for each record
     while ($row = mysql_fetch_array($rs))

                 echo"<tr id='". $row[0] . "'><td>
</td><td> $row[6] </td><td> $row[0]</td><td> $row[1] </td><td id='header'><a
href='#' onClick='FuncShowHide(" . $row[0] . ")'> More Info.</a></td><td
id='header'><a class='WHATSTHIS' onclick='selectLoc([0])'
href='javascript:;'>Select this Location</a></td></tr>";
                 echo"<tr id='hideShow'
style='display:none'><td><strong>Address:</strong> $row[3]
</td><td><strong>Address:</strong>$row[4] </td><td><strong>City:</strong>
$row[5] </td><td> $row[6]</td><td>$row[7] </td><td><strong>Phone:</strong>
$row[2] </td></tr>";

     echo "</table>";
and in the JS I have:

<script language="javascript" type="text/javascript">
      function FuncShowHide(row){

      if (document.getElementById('hideShow').style.display ==
         document.getElementById('hideShow').style.display = "none";
      } else {
         document.getElementById('hideShow').style.display =


More information about the thelist mailing list