I have this piece of code; what it does is that when user press a button, the item is added to the shopping cart. I use the onClick even't for this, its working perfectly on IE, however no on Firefox or related browsers. Does anyone have any idea what this may be? I looked around the net for this problem, and found a lot of people with the same problem, but no a definitive solution. Thanks for the help! <? if ($productrow['status']) { if ($productrow['type'] == 0 && ($isMember || $isAdmin)) { echo "<a href='#' onclick='append_cookie(\"cartcontent\", \"".$productrow['productID']."\", \"\")'>"; echo "<img src='$addtocart_button' border=0>"; echo "</a>"; echo "<a href='".FILE_DOWNLOAD."?productID=".$productrow['productID']."'>"; echo "<img src='$download_button' border=0>"; echo "</a>"; } else if ($productrow['type'] == 0 && (!$isMember && !$isAdmin)) { echo "<b>Member Download Only</b>"; } else if ($productrow['type'] == 1 || $productrow['type'] == 2) { echo "<a href='#' onclick='append_cookie(\"cartcontent\", \"".$productrow['productID']."\", \"\")'>"; echo "<img src='$addtocart_button' border=0>"; echo "</a>"; echo "<a href='#' onclick='append_cookie(\"cartcontent\", \"".$productrow['productID']."\", \"\");self.location.replace(\"".FILE_INDEX."?action=checkout\")'>"; echo "<img src='$buy_button' border=0>"; echo "</a>"; } } else { // product n/a for download or purchase echo "<img src='$na_button' border=0>"; } ?> PHP:
Do you have firebug installed? It integrates with Firefox and will give you specific javascript errors. It may help you locate your issue.
Thanks for your reply apmsolutions, Im checking around and I see it have to do with the onClick thing. A lot of people have the same issue...I will test it with firebug and see what happen!