Jump to content

Javascript


jay_bo

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.