Hello Im trying to get this show hide layers to work with java script... I got one link to do it.. but when it pulls more than one link from the database it doesnt work. does any one have any pointers?
<?php
//pull news
$shownews = "SELECT record_num, title, text_date, content FROM news_update";
$display = mysql_query($shownews);
//display news titles
while($row = mysql_fetch_array($display)) {
$rec_num = $row['record_num']; ?>
<a href="javascript:;" onclick="MM_showHideLayers('view','','show')"><? print $row['text_date'] . ' - ' . $row['title']; ?></a><br />
<?
if($id == $rec_num) { ?>
<div id="view" style="position: absolute; visibility: hidden; background-color:#FFFFFF">
<?php print '<table width=526>
<tr>
<td class=titlehead>' . $row['text_date'] . '</td>
</tr>
<tr>
<td class=title>' . $row['title'] . '</td>
</tr>
<tr>
<td>' . $row['content'] . '</td>
</tr>
</table>';
} ?> </div>
<?php }
?>