egturnkey Posted January 26, 2010 Share Posted January 26, 2010 Hello friends, I've simple cart script where a button once visitor click on it,it send the item to the cart It works fine on IE and not working on FF due to something called append_cookie here is the code <? } 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 { echo "<img src='$na_button' border=0>"; } ?> Link to comment https://forums.phpfreaks.com/topic/189828-works-fine-on-ie-and-not-on-ff/ Share on other sites More sharing options...
jl5501 Posted January 26, 2010 Share Posted January 26, 2010 The append_cookie() function is a javascript function that is being called by your code. In FFX, you can see any javascript errors by opening the error console from the tools menu, and then load and run your page. You will then see any javascript errors that are generated. Link to comment https://forums.phpfreaks.com/topic/189828-works-fine-on-ie-and-not-on-ff/#findComment-1001716 Share on other sites More sharing options...
egturnkey Posted January 26, 2010 Author Share Posted January 26, 2010 The append_cookie() function is a javascript function that is being called by your code. In FFX, you can see any javascript errors by opening the error console from the tools menu, and then load and run your page. You will then see any javascript errors that are generated. Thanks, now i can see it but i don't know how to define it here is the js file also may helps http://www.manalnor.com/misc.js thanks Link to comment https://forums.phpfreaks.com/topic/189828-works-fine-on-ie-and-not-on-ff/#findComment-1001718 Share on other sites More sharing options...
egturnkey Posted January 26, 2010 Author Share Posted January 26, 2010 i've downloaded firefox firebug addon and it gives the same error function is not defined :'( how can i fix this thanks Link to comment https://forums.phpfreaks.com/topic/189828-works-fine-on-ie-and-not-on-ff/#findComment-1001769 Share on other sites More sharing options...
jl5501 Posted January 26, 2010 Share Posted January 26, 2010 Ok that append_cookie() function is certainly in that js file, so when you call it, that file does not seem to have been included. You need to check where the include of the js file is, and where your call to the append_cookie() function is Link to comment https://forums.phpfreaks.com/topic/189828-works-fine-on-ie-and-not-on-ff/#findComment-1001783 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.