473,320 Members | 2,094 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

shopping cart items page with several 'remove' buttons

how would I go doing it without javascript and using 'POST'?
Having a page with a variable list of items in a shopcart, each item
with its own 'remove' button. How could I do this without a javascript
and using POST as the form type? (so having <a href="page.htm?remove=2>
is not possible)

Jun 16 '06 #1
3 1788

wo******@gmail.com wote:
how would I go doing it without javascript and using 'POST'?
Having a page with a variable list of items in a shopcart, each item
with its own 'remove' button. How could I do this without a javascript
and using POST as the form type? (so having <a href="page.htm?remove=2>
is not possible)


It depends on how you do it.
1. You can do it with a graphic, so <a href="cart.htm?remove=2"><img
src="trash.png" alt="Move to Trash" title="Place item in the trash"
width="16" height="16"></a>
2. Put the items into a list and use check boxes. You can use a
little javascript for a "check all" button - that will work for users
with javascript - but the submit button will still be available for
those without. I would use a POST method, so you would come up with:
DELETE FROM table WHERE id IN (1,2,3,4,5,6,7)
3. You can do it with javascript and the button element. However,
buttons will not work for users without javascript enabled.

Personally, I would go for number 2. It is probably the easiest for
the user, and you, as the developer.

Jun 16 '06 #2

arbpen wrote:
wo******@gmail.com wote:
how would I go doing it without javascript and using 'POST'?
Having a page with a variable list of items in a shopcart, each item
with its own 'remove' button. How could I do this without a javascript
and using POST as the form type? (so having <a href="page.htm?remove=2>
is not possible)
It depends on how you do it.
1. You can do it with a graphic, so <a href="cart.htm?remove=2"><img
src="trash.png" alt="Move to Trash" title="Place item in the trash"
width="16" height="16"></a>
2. Put the items into a list and use check boxes. You can use a
little javascript for a "check all" button - that will work for users
with javascript - but the submit button will still be available for
those without. I would use a POST method, so you would come up with:
DELETE FROM table WHERE id IN (1,2,3,4,5,6,7)
3. You can do it with javascript and the button element. However,
buttons will not work for users without javascript enabled.

Thanks but I have to restrictions I must adhere to if possible:
- No javascript
- Without passing parameters in the URL (my boss doesn't want to see
like cart.htm?remove=2 for example)
Personally, I would go for number 2. It is probably the easiest for
the user, and you, as the developer.


Jun 18 '06 #3
Gazing into my crystal ball I observed wo******@gmail.com writing in
news:11**********************@p79g2000cwp.googlegr oups.com:

arbpen wrote:
wo******@gmail.com wote:
> how would I go doing it without javascript and using 'POST'?
> Having a page with a variable list of items in a shopcart, each
> item with its own 'remove' button. How could I do this without a
> javascript and using POST as the form type? (so having <a
> href="page.htm?remove=2> is not possible)


It depends on how you do it.
1. You can do it with a graphic, so <a href="cart.htm?remove=2"><img
src="trash.png" alt="Move to Trash" title="Place item in the trash"
width="16" height="16"></a>
2. Put the items into a list and use check boxes. You can use a
little javascript for a "check all" button - that will work for users
with javascript - but the submit button will still be available for
those without. I would use a POST method, so you would come up with:
DELETE FROM table WHERE id IN (1,2,3,4,5,6,7)
3. You can do it with javascript and the button element. However,
buttons will not work for users without javascript enabled.

Thanks but I have to restrictions I must adhere to if possible:
- No javascript
- Without passing parameters in the URL (my boss doesn't want to see
like cart.htm?remove=2 for example)
Personally, I would go for number 2. It is probably the easiest for
the user, and you, as the developer.



Then either number 2 or

For Each Item in List
<form method="POST" action="nameofscript">
Item Number <input type="submit" name="itemnumber" value="Delete">
</form>
Next

Then your sql would be DELETE FROM table WHERE id = " & request.form


--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Jun 18 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Paul Bruneau | last post by:
Hi, I hope someone can help me make a working shopping cart, as a learning tool. If I have a "Product Demo" html page with a "Buy Me" button, there must be a simple javascript method of...
9
by: Penny | last post by:
Hi all, I've built an online shopping cart using ASP Classic(based on a 'WebThang' tutorial). The shop cart page (with table showing customers selected items and costs) has only 3 buttons/links....
2
by: Guadala Harry | last post by:
I'm looking to implement some *minimal* shopping cart. I've looked at a few 3rd party packages, and they're all way too involved for what I need. So, I'm thinking it might make sense to roll my...
2
by: G.E.M.P | last post by:
High Level Session Handling Design for a Shopping cart 0) What am I missing? 1) How does OSCommerce do it? I'm thinking about building a shopping cart from scratch, using a library of dynamic...
7
by: isaac2004 | last post by:
hi i have a basic asp page that acts as an online bookstore. on my cart page i am having trouble generating 3 numbers; a subtotal, a shipping total, and a final price. here is my code i would...
6
by: wolfing1 | last post by:
how would I go doing it without javascript and using 'POST'? Having a page with a variable list of items in a shopcart, each item with its own 'remove' button. How could I do this without a...
1
by: Vahehoo | last post by:
Hi, I have an ASP .Net e-business site that is built using DNN 2.0. I am having troubles passing my shopping cart items to PayPal. I implemented a total paynow button, but it was not good enough...
1
by: jecha | last post by:
I'm implementing a shopping cart but am having a problem in checking out a person who has added item in his/her shopping busket.The code for the checkout.php script is given below <?...
1
by: BenKen | last post by:
Hi all pls I'm having great difficulty in making my shopping cart work. I am a newbie in php with little understanding of it. Add to cart button doesn't work and shopping cart in general doesn't. Pls...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.