473,799 Members | 2,666 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1806

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.goo glegroups.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="nameofs cript">
Item Number <input type="submit" name="itemnumbe r" 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
3318
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 storing the necessary product information. There could be several fields involved... Then there ought to be another javascript method that can create a new document based on the list a user has built selecting product from several
9
2339
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. 1: Back to Shop: Uses 'javascript:history.go(-1)' to go to previous page. 2: Remove Item(one next to each item in cart): Clears the selected item from the session variable array redisplays the page.
2
1653
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 own. Before diving in though, I'd like to have any recommendations or suggestions from any of you who have done or seen "bare bones" shopping carts/store fronts. I'd like to integrate it with an existing SQL Server database that holds the customer,...
2
2301
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 screen generation routines (already written) that take an XML stream as input from various "search for products" forms. That way I can run queries in one window and display the dynamic results in another. The searching functions will probably
7
2637
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 like it to work properly so that a record count counts through all the books and genertates these numbers. watch out for line breaks <%@ Language=VBScript %> <% Option Explicit %> <!--#include file="DatabaseConnect.asp"-->
6
2426
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 javascript and using POST as the form type? (so having <a href="page.htm?remove=2> is not possible)
1
2108
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 for my customer. I found some PayPal ASP.Net controls to be used with .net studio. Basically, I want the user to be able to shop on my website, add items to my shopping cart and at the checkout to be taken to the PayPal website. I would like...
1
7301
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 <? require_once('functions.inc.php'); session_start(); do_html_header("Checkout"); $cart = $_SESSION; if($cart&&array_count_values($cart)) { display_cart($cart,false,0); display_checkout_form($HTTP_POST_VARS);
1
7676
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 help. Below is the code for both shopping cart, products and function.php shopping cart code: <? include("db.php"); include("functions.php"); if($_REQUEST=='delete' && $_REQUEST>0){ remove_product($_REQUEST);
0
9689
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9550
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10495
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10269
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10248
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10032
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7573
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4148
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.