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.