Dominos Posted January 10, 2005 Posted January 10, 2005 Im trying to launch an alert javascript like that: // if there is nothing in the customers cart, redirect them to the shopping cart page if ($cart->count_contents() < 10) { echo '<script language="javascript">alert ("Minimun products is 10");</script>'; tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } in shopping_cart.php Javascript works, but finally I always got error like that: Warning: Cannot add header information - headers already sent by (output started at /var/www/oscommerce/includes/classes/shopping_cart.php... So I'd like to show a javascript message and then, come back to shopping_cart
Dominos Posted January 10, 2005 Author Posted January 10, 2005 there is a minimum order contribution <{POST_SNAPBACK}> Thx, but this was an example. I only want to know the way to launch a javascript like that or similar; echo '<script language="javascript">alert ("This is a javascript message");</script>'; and only show a message, any message.
Dominos Posted January 10, 2005 Author Posted January 10, 2005 BTW, I found the js example (echo '<script language="javascript">alert ("This is a javascript message");</script>';) in a min order contribution post Thx
Recommended Posts
Archived
This topic is now archived and is closed to further replies.