Jump to content

Shopping Cart script


Lalla

Recommended Posts

i want to submit values from one web page to another web page , using javascript

 

this is a shopping cart program,

 

a user selects items he/she wishes by checking the checkboxes provided.

 

then all these should go on to a shopping cart which is in another page.

 

and my web page consist of several pages, where the user can select alot of products from each page.

Link to comment
Share on other sites

Sorry the post should look like this:

 

i want to submit values from one web page to another web page

 

this is a shopping cart program,

 

a user selects items he/she wishes by checking the checkboxes provided.

 

then all these should go on to a shopping cart which is in another page.

 

and my web page consist of several pages, where the user can select alot of products from each page.

Link to comment
Share on other sites

I'm guessing you want this to happen without submitting any forms or anything then? So like when the user clicks the check box, it's automatically added to the shopping cart without refreshing the page or submitting a form?

 

Regards

 

NB This is the PHP board, not JS!

Link to comment
Share on other sites

Think this one would be better suited for the Ajax board even, if you want it to happen the second the checkbox is clicked you'll have to attach onchange eventlisteners to the checkboxes which then fire a xmlhttp requests posting the value to a PHP script which in turn adds the things to a database which the "Shopping cart" page you mention makes use of.

 

If you're using an existing webshop system you may want to check if it provides an API against which you can fire the requests.

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.