Here’s one for the web perfectionists out there. The usual line with HTTP and web browsing is that requests are achieved through the GET verb, and data modifications are through POST.
All well and good, but how do you handle text links that trigger a data modification? For instance, a page might have a list of items in a table, with “Edit – Delete” as associated actions. Edit is simple, it might go to edit?id=…, but Delete is more tricky. Assuming that no interstital “Are you sure” page is necessary, how can you trigger a POST from that Delete link?
<form action="" method="post" name="jsPost"> <input type="hidden" name="action" value=""> <input type="hidden" name="item" value=""> </form>
Any ideas for a better, but clean solution?