<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

      <title>Comments on: Proper GET/POST Design for Deleting Items on a Web Page</title>
      <link>http://ask.metafilter.com/63199/Proper-GETPOST-Design-for-Deleting-Items-on-a-Web-Page/</link>
      <description>Comments on Ask MetaFilter post Proper GET/POST Design for Deleting Items on a Web Page</description>
	  	  <pubDate>Tue, 22 May 2007 17:26:28 -0800</pubDate>
      <lastBuildDate>Tue, 22 May 2007 17:26:28 -0800</lastBuildDate>
      <language>en-us</language>
	  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
	  <ttl>60</ttl>

<item>
  	<title>Question: Proper GET/POST Design for Deleting Items on a Web Page</title>
  	<link>http://ask.metafilter.com/63199/Proper-GETPOST-Design-for-Deleting-Items-on-a-Web-Page</link>	
  	<description>I&apos;m designing a webpage that will have a list of items and each item can be deleted.  I was thinking to have the delete command be link to a URL that does the delete when called.  But then I realized maybe that isn&apos;t safe since a spider following links might cause things to be deleted.  What is the proper design for this type of thing?</description>
  	<guid isPermaLink="false">post:ask.metafilter.com,2008:site.63199</guid>
  	<pubDate>Tue, 22 May 2007 17:21:37 -0800</pubDate>
  	<dc:creator>GregX3</dc:creator>
	
	<category>POST</category>
	
	<category>GET</category>
	
	<category>Delete</category>
	
	<category>HTML</category>
	
	<category>web</category>
	
</item>
<item>
  	<title>By: chrismear</title>
  	<link>http://ask.metafilter.com/63199/Proper-GETPOST-Design-for-Deleting-Items-on-a-Web-Page#951045</link>	
  	<description>Use a form with just a submit button, which results in a POST request to the delete URL. On the server-side, check that you have a POST request, not a GET request, before you do the delete. After a successful delete, do a redirect back to the list URL.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63199-951045</guid>
  	<pubDate>Tue, 22 May 2007 17:26:28 -0800</pubDate>
  	<dc:creator>chrismear</dc:creator>
</item>
<item>
  	<title>By: GregX3</title>
  	<link>http://ask.metafilter.com/63199/Proper-GETPOST-Design-for-Deleting-Items-on-a-Web-Page#951047</link>	
  	<description>Ideally I want a link next to each item that says &amp;quot;delete&amp;quot;.  How could I do this with a form with a submit button?</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63199-951047</guid>
  	<pubDate>Tue, 22 May 2007 17:28:30 -0800</pubDate>
  	<dc:creator>GregX3</dc:creator>
</item>
<item>
  	<title>By: flabdablet</title>
  	<link>http://ask.metafilter.com/63199/Proper-GETPOST-Design-for-Deleting-Items-on-a-Web-Page#951048</link>	
  	<description>In general, if you want to put something on a web page that Does Something, rather than just Goes Somewhere, use a form and check for POST.  Links are just for linking.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63199-951048</guid>
  	<pubDate>Tue, 22 May 2007 17:29:35 -0800</pubDate>
  	<dc:creator>flabdablet</dc:creator>
</item>
<item>
  	<title>By: flabdablet</title>
  	<link>http://ask.metafilter.com/63199/Proper-GETPOST-Design-for-Deleting-Items-on-a-Web-Page#951049</link>	
  	<description>How to do the form: the only visible control should be a the submit (Delete) button, and whatever you need server-side to identify what to delete should be an &amp;lt;input type=&amp;quot;hidden&amp;quot; .../&amp;gt; in the same form.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63199-951049</guid>
  	<pubDate>Tue, 22 May 2007 17:32:11 -0800</pubDate>
  	<dc:creator>flabdablet</dc:creator>
</item>
<item>
  	<title>By: GregX3</title>
  	<link>http://ask.metafilter.com/63199/Proper-GETPOST-Design-for-Deleting-Items-on-a-Web-Page#951050</link>	
  	<description>Well I guess each delete &amp;quot;link&amp;quot; could be its own form as in &lt;br&gt;
&amp;lt;form ...&amp;gt;&amp;lt;button ... &amp;gt;Delete&amp;lt;/button&amp;gt;&amp;lt;/form&amp;gt;&lt;br&gt;
&lt;br&gt;
Would that work?</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63199-951050</guid>
  	<pubDate>Tue, 22 May 2007 17:33:26 -0800</pubDate>
  	<dc:creator>GregX3</dc:creator>
</item>
<item>
  	<title>By: Mach5</title>
  	<link>http://ask.metafilter.com/63199/Proper-GETPOST-Design-for-Deleting-Items-on-a-Web-Page#951051</link>	
  	<description>seconding chrismear and flabdablets advice.  &lt;a href=&quot;http://worsethanfailure.com/Articles/The_Spider_of_Doom.aspx&quot;&gt;dont be WTF.&lt;/a&gt;</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63199-951051</guid>
  	<pubDate>Tue, 22 May 2007 17:33:48 -0800</pubDate>
  	<dc:creator>Mach5</dc:creator>
</item>
<item>
  	<title>By: GregX3</title>
  	<link>http://ask.metafilter.com/63199/Proper-GETPOST-Design-for-Deleting-Items-on-a-Web-Page#951054</link>	
  	<description>Ok, right, like flabdablet said.  Thanks, I&apos;ll use that.  &lt;br&gt;
&lt;br&gt;
Can a button tag display words and look like a link?  If so it would be ideal.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63199-951054</guid>
  	<pubDate>Tue, 22 May 2007 17:34:54 -0800</pubDate>
  	<dc:creator>GregX3</dc:creator>
</item>
<item>
  	<title>By: iguanapolitico</title>
  	<link>http://ask.metafilter.com/63199/Proper-GETPOST-Design-for-Deleting-Items-on-a-Web-Page#951059</link>	
  	<description>You can style a submit button to look just like a text link if you want to.  Something like &amp;lt;input type=&amp;quot;submit&amp;quot; style=&amp;quot;border:0; background: #ffffff; color: #EC2F27; text-decoration: underline;&amp;quot; name=&amp;quot;blah&amp;quot; value=&amp;quot;delete&amp;quot;&amp;gt;.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63199-951059</guid>
  	<pubDate>Tue, 22 May 2007 17:38:37 -0800</pubDate>
  	<dc:creator>iguanapolitico</dc:creator>
</item>
<item>
  	<title>By: chrismear</title>
  	<link>http://ask.metafilter.com/63199/Proper-GETPOST-Design-for-Deleting-Items-on-a-Web-Page#951061</link>	
  	<description>If you want a link, and are happy to require JavaScript, this snippet creates an invisible form and submits it when you click on the link:&lt;br&gt;
&lt;br&gt;
&lt;code&gt;&amp;lt;a href=&amp;quot;delete_url&amp;quot; onclick=&amp;quot;var f = document.createElement(&apos;form&apos;); f.style.display = &apos;none&apos;; this.parentNode.appendChild(f); f.method = &apos;POST&apos;; f.action = this.href;var m = document.createElement(&apos;input&apos;); m.setAttribute(&apos;type&apos;, &apos;hidden&apos;); m.setAttribute(&apos;name&apos;, &apos;_method&apos;); m.setAttribute(&apos;value&apos;, &apos;delete&apos;); f.appendChild(m);f.submit();return false;&amp;quot;&amp;gt;Delete&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
(Taken from the Rails ActionView helpers.)</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63199-951061</guid>
  	<pubDate>Tue, 22 May 2007 17:45:08 -0800</pubDate>
  	<dc:creator>chrismear</dc:creator>
</item>
<item>
  	<title>By: GregX3</title>
  	<link>http://ask.metafilter.com/63199/Proper-GETPOST-Design-for-Deleting-Items-on-a-Web-Page#951067</link>	
  	<description>Thanks for the help everyone.  I believe I have my answer.  The javascript version looks cool too, I may try that later.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63199-951067</guid>
  	<pubDate>Tue, 22 May 2007 17:52:28 -0800</pubDate>
  	<dc:creator>GregX3</dc:creator>
</item>
<item>
  	<title>By: cerebus19</title>
  	<link>http://ask.metafilter.com/63199/Proper-GETPOST-Design-for-Deleting-Items-on-a-Web-Page#951092</link>	
  	<description>I&apos;ve used the trick iguanapolitico suggests myself, and it&apos;s great, with one exception: It doesn&apos;t work at all in Safari.  If you don&apos;t care about that, that&apos;s fine, but Safari will not ignore styles on submit buttons no matter what you do.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63199-951092</guid>
  	<pubDate>Tue, 22 May 2007 18:39:13 -0800</pubDate>
  	<dc:creator>cerebus19</dc:creator>
</item>
<item>
  	<title>By: cerebus19</title>
  	<link>http://ask.metafilter.com/63199/Proper-GETPOST-Design-for-Deleting-Items-on-a-Web-Page#951093</link>	
  	<description>Make that &amp;quot;will ignore styles...&amp;quot;</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63199-951093</guid>
  	<pubDate>Tue, 22 May 2007 18:39:50 -0800</pubDate>
  	<dc:creator>cerebus19</dc:creator>
</item>
<item>
  	<title>By: sonofslim</title>
  	<link>http://ask.metafilter.com/63199/Proper-GETPOST-Design-for-Deleting-Items-on-a-Web-Page#951102</link>	
  	<description>&lt;em&gt; Safari will ignore styles on submit buttons&lt;/em&gt;&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://particletree.com/features/rediscovering-the-button-element/&quot;&gt;Not on button elements&lt;/a&gt;, however. But they are tough as hell to style consistently across browsers.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63199-951102</guid>
  	<pubDate>Tue, 22 May 2007 18:48:13 -0800</pubDate>
  	<dc:creator>sonofslim</dc:creator>
</item>
<item>
  	<title>By: drjimmy11</title>
  	<link>http://ask.metafilter.com/63199/Proper-GETPOST-Design-for-Deleting-Items-on-a-Web-Page#951198</link>	
  	<description>there&apos;s no need to use a submit button. as sort of mentioned above any form can be submitted by js.&lt;br&gt;
&lt;br&gt;
a href=&amp;quot;#&amp;quot; onlick=javascript:document.getElementById(&apos;yourFormNAmeHEre&apos;).submit()&amp;quot;</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.63199-951198</guid>
  	<pubDate>Tue, 22 May 2007 21:09:06 -0800</pubDate>
  	<dc:creator>drjimmy11</dc:creator>
</item>

    </channel>
</rss>
