jay_bo Posted April 28, 2010 Share Posted April 28, 2010 Okay i have a shopping cart which has the ability to add and remove items in the cart, which is done by javascript..as seen below function del(pid){ if(confirm('Do you really mean to delete this item')){ document.form1.pid.value=pid; document.form1.command.value='delete'; document.form1.submit(); } } function update_cart(){ document.form1.command.value='update'; document.form1.submit(); } It use to work fine when i add <form name="form1" method="POST"> but i recently changed it to the code below, so that i can link it to paypal. <form name="form1" action="https://www.sandbox.paypal.com/uk/cgi-bin/webscr" method="POST"> Since i add this when i click to update an item it doesn't update, it just submits the form.....Now i know this has something to do with the javascript line.... document.form1.submit(); Is there anyway that i could get it to refresh the page? Link to comment https://forums.phpfreaks.com/topic/200046-javascript/ Share on other sites More sharing options...
Ken2k7 Posted April 28, 2010 Share Posted April 28, 2010 Did you know there is a JavaScript forum? This forum is for PHP coding help. Link to comment https://forums.phpfreaks.com/topic/200046-javascript/#findComment-1049976 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.