blackcell Posted January 16, 2008 Share Posted January 16, 2008 I want to loop through a small database. For each record in the database I am going to display (in a table): record1 note1 record2 note2 record2 note3 record3 note4 record4 note5 record5 note6 When I onmouseOver the record# I want to show a picture for record# I can easily do this with php and using like a "Picture Link" that is associated with the record#.png and it works. I have done it a million times but I am new to jscript and I don't know quite how to do it. What I have so far: <script type="text/javascript"> function mouseOver(imageName) { document.b1.src = imageName; } </script> <? My Loop begins here assigning variables ?> <html> <table> <tr> <td onmouseOver="mouseOver(<? echo "$record_number.png" ?>)" align="left"><? echo $recordnumber?> </tr> </html> <? My Loop ends here ?> Quote Link to comment Share on other sites More sharing options...
blackcell Posted January 16, 2008 Author Share Posted January 16, 2008 After a simple test I found that my html table header row will work fine with the jscript, but the rows that are populated by my loop that is pulling information from a mysql database will not work. Even when I use two simple pictures with no variables. Anybody got anything? Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted January 16, 2008 Share Posted January 16, 2008 how do you want you picture to display; I don't see a image tag or background image any where in your code? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.