Jump to content

tifatima

New Members
  • Posts

    1
  • Joined

  • Last visited

tifatima's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Please help me with my script. In another forum, I have read that it is impossible to have Javascript work in a PHP loop. What i wanted to do is to select only the products that has the status of live and output it in my webpage. The thing is, it outputs the values I retrieved from the database but the countdown timer only works in one product. Another problem of mine is that the onmouseover doesn't work at all. Please help me on how to solve those problems. Thank you! [/font] [font=Verdana, sans-serif]<?php $howmany = mysql_query("SELECT * FROM product WHERE status = 'LIVE'"); $nrow = mysql_num_rows($howmany); for($i = 0; $i < $nrow; $i++){ $row = mysql_fetch_array($howmany); $pname = $row[1]; $closedate = $row[4]; $img = $row[10]; ?> <td align='center'> <table background="images/auctionbox.gif" width="170" height="330"> <tr> <td align="center"><?php echo $pname; ?></td> </tr> <tr> <td height="50px" align="center" width="50px"><img src="<?php echo $img; ?>"></td> </tr> <tr> <td align="center"> <script language="Javascript"> TargetDate = "<?php echo $closedate ?>"; CountActive = true; CountStepper = -1; LeadingZero = true; DisplayFormat = "%%D%%d %%H%%:%%M%%:%%S%%"; FinishMessage = "CLOSED!"; </script> <script language="Javascript" src="includes/countdown.js"></script> </td> </tr> <tr> <td align="center">P<label id="this">1.00</td> </tr> <tr> <td align="center">Last Bidder</td> </tr> <tr> <td align="center"> <script type="Javascript" src="includes/idkthis.js"></script> <a onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('BidButton','','images/bid-login.gif',1)" href="login"> <img name="BidButton" onload="MM_preloadImages('images/bid-login.gif')" width="90" height="40" src="images/bid-bid.gif"></a> </td> </tr> </table> </td> <?php } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.