And i use it likeCode:<script language="JavaScript" type="text/JavaScript"> function SwapImg (name, action) { if(action == "out"){ eval("document."+name+".src=\"images/sq_false.gif\""); }if(action == "over"){ eval("document."+name+".src=\"images/sq_true.gif\""); }if(action == "click"){ eval("document."+name+".src=\"images/sq_true.gif\""); } } </script>
My questions:Code:<tr> <td><img src="images/sq_false.gif" name="sq" width="7" height="7" border="0" /></td> <td><a href="<?php echo $_SERVER['PHP_SELF']."?&nav=works&subNav=done"; ?>" onMouseOver="SwapImg ('sq','over')" onMouseOut="SwapImg ('sq','out')"><img src="images/done_false.gif" border="0" ></a></td> </tr>
1/ How would i use "action==click" by which the over-stated is retained?
2/ Why do i get an error message when i create the A href dynamicly like
It generates:Code:<td width="7"><img src="images/sq_false.gif" name="<?php echo $row['id']; ?>" width="7" height="7" border="0"/></td> <td class="regularText"><a href="<?php echo $_SERVER['PHP_SELF']."?&nav=works&subNav=".$subNav."&slct=".$row['id']; ?>" onMouseOver="SwapImg ('<?php echo $row['id']; ?>','over')" onMouseOut="SwapImg ('<?php echo $row['id']; ?>','out')"><?php echo $row['worksNme']; ?></a></td>
Any ideasCode:<td width="7"><img src="images/sq_false.gif" name="11" width="7" height="7" border="0"/></td> <td class="regularText"><a href="content.php?&nav=works&subNav=doing&slct=11" onMouseOver="SwapImg ('11','over')" onMouseOut="SwapImg ('11','out')">Test </a></td>






Bookmarks