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) 6 2403
You have a shopping cart, what is the justification for no javascript?
Do you really think there are people out there who would give you their
credit card number but wouldn't trust you to popup a window or an alert
message using JavaScript?
<wo******@gmail.com> wrote in message
news:11**********************@y41g2000cwy.googlegr oups.com... 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)
wolfi...@gmail.com wrote: 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)
<form method="post" action="delete_an_entry_page.asp">
<input type="hidden" value="<%=cart_item_value%">
<input type="submit" name="action" value="Delete">
</form>
Or am I missing something tricky in your question?
--
Mike Brind
Mike Brind wrote: wolfi...@gmail.com wrote: 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)
<form method="post" action="delete_an_entry_page.asp"> <input type="hidden" value="<%=cart_item_value%"> <input type="submit" name="action" value="Delete"> </form>
Or am I missing something tricky in your question?
-- Mike Brind
The thing is, there are several (variable number of) 'delete' buttons,
one for each item. How would the page know which one of them was
clicked?
Like, if I knew there would be, say, 10 buttons, I could name them all
button1, button2, etc. and in the asp page I could ask for button1.x.
But if I don't know how many items would there be in the page in
advance, how would I do that? wo******@gmail.com wrote: Mike Brind wrote: wolfi...@gmail.com wrote: 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)
<form method="post" action="delete_an_entry_page.asp"> <input type="hidden" value="<%=cart_item_value%"> <input type="submit" name="action" value="Delete"> </form>
Or am I missing something tricky in your question?
-- Mike Brind The thing is, there are several (variable number of) 'delete' buttons, one for each item. How would the page know which one of them was clicked? Like, if I knew there would be, say, 10 buttons, I could name them all button1, button2, etc. and in the asp page I could ask for button1.x. But if I don't know how many items would there be in the page in advance, how would I do that?
You can tell which one was clicked from the value passed in the hidden
field. Although to make it work, you would have to give the hidden
field a name - something I neglected to do :-)
<form method="post" action="delete_an_entry_page.asp">
<input type="hidden" name ="cartitem" value="<%=cart_item_value%">
<input type="submit" name="action" value="Delete">
</form>
If Request.Form("action") = "Delete" Then
Remove item from cart where cart_item_id = Request.Form("cartitme")
--
Mike Brind
<wo******@gmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com... Mike Brind wrote: wolfi...@gmail.com wrote: > 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)
<form method="post" action="delete_an_entry_page.asp"> <input type="hidden" value="<%=cart_item_value%"> <input type="submit" name="action" value="Delete"> </form>
Or am I missing something tricky in your question?
-- Mike Brind The thing is, there are several (variable number of) 'delete' buttons, one for each item. How would the page know which one of them was clicked?
Because there is a form for each button, and an <input type=hidden
name=productid value="<%=productid%>">
A
Aaron Bertrand [SQL Server MVP] wrote: <wo******@gmail.com> wrote in message news:11**********************@g10g2000cwb.googlegr oups.com... Mike Brind wrote: wolfi...@gmail.com wrote: > 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)
<form method="post" action="delete_an_entry_page.asp"> <input type="hidden" value="<%=cart_item_value%"> <input type="submit" name="action" value="Delete"> </form>
Or am I missing something tricky in your question?
-- Mike Brind The thing is, there are several (variable number of) 'delete' buttons, one for each item. How would the page know which one of them was clicked?
Because there is a form for each button, and an <input type=hidden name=productid value="<%=productid%>">
Oh so each item would be a form in itself? hmm... oh hey that's pretty
cool, let me try that thanks! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: mimages |
last post by:
I can't figure this out. There are too many differences between my
installation of osCommerce and what I read on these forums, and in the
contributions' readme files. I have either lost my logical...
|
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...
|
by: Mark Hannon |
last post by:
I am designing a PayPal shopping cart/store for a client and have placed
several of PayPal's shopping cart forms on the page to correspond with
different products. Each form has a unique name...
|
by: Brian Henry |
last post by:
I have two list boxes on my form... lstCanSend and lstRecipients... well
then there are two buttons add and remove between them (your basic select
and pick listing) which uses java script to move...
|
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...
|
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...
|
by: Daniele |
last post by:
Hi
I want to build a shop from scratch,
i'm laying down all the possible problem i can find during the way.
how can i structure the database to be able to add unlimited properties
or attribute to...
|
by: shotokan99 |
last post by:
hi pipz,
im working on a simple cart, whenever the user click on "add to cart"
link i store the data to mysql. then i display these records using a
table and each row i place "remove" link.
...
|
by: Richard |
last post by:
Hi,
I've got a potential client and potential problem. The client wants a
website based on CMS with forum, blog and cart solution. Here's the
problem.
I could offer him:
- website based on...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
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...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
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...
|
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)...
|
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...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| | |