<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>Comments on: Fixing the IE7 &lt;Button&gt; Submit Value</title>
	<atom:link href="https://rommelsantor.com/clog/2012/03/12/fixing-the-ie7-submit-value/feed/" rel="self" type="application/rss+xml" />
	<link>https://rommelsantor.com/clog/2012/03/12/fixing-the-ie7-submit-value/</link>
	<description>my exploits and misadventures in programming</description>
	<lastBuildDate>Wed, 18 Feb 2015 21:43:38 +0000</lastBuildDate>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.0.38</generator>
	<item>
		<title>By: rommel</title>
		<link>https://rommelsantor.com/clog/2012/03/12/fixing-the-ie7-submit-value/comment-page-1/#comment-201287</link>
		<dc:creator><![CDATA[rommel]]></dc:creator>
		<pubDate>Wed, 18 Feb 2015 21:43:38 +0000</pubDate>
		<guid isPermaLink="false">http://rommelsantor.com/clog/?p=334#comment-201287</guid>
		<description><![CDATA[Thanks for the reply, Chris. You&#039;re totally right that a BUTTON tag should have type=&quot;submit&quot; included if possible.

Your hidden input suggestion, however, is not a solution if your intent is to determine which button the user clicked.

By the way, when is Guardians of the Galaxy 2 coming out? [I can&#039;t imagine how tired you must be of hearing that type of comment, so I apologize. ;-p ]]]></description>
		<content:encoded><![CDATA[<p>Thanks for the reply, Chris. You&#8217;re totally right that a BUTTON tag should have type=&#8221;submit&#8221; included if possible.</p>
<p>Your hidden input suggestion, however, is not a solution if your intent is to determine which button the user clicked.</p>
<p>By the way, when is Guardians of the Galaxy 2 coming out? [I can&#8217;t imagine how tired you must be of hearing that type of comment, so I apologize. ;-p ]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Pratt</title>
		<link>https://rommelsantor.com/clog/2012/03/12/fixing-the-ie7-submit-value/comment-page-1/#comment-201285</link>
		<dc:creator><![CDATA[Chris Pratt]]></dc:creator>
		<pubDate>Wed, 18 Feb 2015 21:24:41 +0000</pubDate>
		<guid isPermaLink="false">http://rommelsantor.com/clog/?p=334#comment-201285</guid>
		<description><![CDATA[You&#039;re only partially correct here. A button will very indeed submit a form in IE7, as long as it has type=&quot;submit&quot;. If you leave this out, then, yes, IE7 won&#039;t do a thing when you click it. However, you should *always* specify the type. Otherwise you&#039;re relying on a browser implementation to decide what happens when the user clicks the button, and while right now most browsers may submit by default, there&#039;s nothing saying that other browsers would choose not to submit, or that this default won&#039;t change. By specifying the type, you, not the particular browser implementation, decide what happens, and that&#039;s the way it should be.

However, you are correct that the button inner text, and not the value is submitted in IE7. Yet, honestly, I think having a submit button actually contain a form value is kind of a bad design choice in the first place. If you want some implicit value passed on submit, then use a hidden input. That&#039;s what they&#039;re for.

So, use hidden inputs for implicit values and add type=&quot;submit&quot; to buttons that should submit the form and suddenly you&#039;re 100% cross-browser with no JS hacks needed. Seems much more sane to me.]]></description>
		<content:encoded><![CDATA[<p>You&#8217;re only partially correct here. A button will very indeed submit a form in IE7, as long as it has type=&#8221;submit&#8221;. If you leave this out, then, yes, IE7 won&#8217;t do a thing when you click it. However, you should *always* specify the type. Otherwise you&#8217;re relying on a browser implementation to decide what happens when the user clicks the button, and while right now most browsers may submit by default, there&#8217;s nothing saying that other browsers would choose not to submit, or that this default won&#8217;t change. By specifying the type, you, not the particular browser implementation, decide what happens, and that&#8217;s the way it should be.</p>
<p>However, you are correct that the button inner text, and not the value is submitted in IE7. Yet, honestly, I think having a submit button actually contain a form value is kind of a bad design choice in the first place. If you want some implicit value passed on submit, then use a hidden input. That&#8217;s what they&#8217;re for.</p>
<p>So, use hidden inputs for implicit values and add type=&#8221;submit&#8221; to buttons that should submit the form and suddenly you&#8217;re 100% cross-browser with no JS hacks needed. Seems much more sane to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>https://rommelsantor.com/clog/2012/03/12/fixing-the-ie7-submit-value/comment-page-1/#comment-26516</link>
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Fri, 04 Apr 2014 14:25:41 +0000</pubDate>
		<guid isPermaLink="false">http://rommelsantor.com/clog/?p=334#comment-26516</guid>
		<description><![CDATA[Thanks for this. Ended my squeaky bum moment when testing my new app on ie7 the evening before UAT.
If only the client had told me of the ie7 requirement at the start of the project........

Bum now relaxed]]></description>
		<content:encoded><![CDATA[<p>Thanks for this. Ended my squeaky bum moment when testing my new app on ie7 the evening before UAT.<br />
If only the client had told me of the ie7 requirement at the start of the project&#8230;&#8230;..</p>
<p>Bum now relaxed</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Lehnert</title>
		<link>https://rommelsantor.com/clog/2012/03/12/fixing-the-ie7-submit-value/comment-page-1/#comment-26357</link>
		<dc:creator><![CDATA[Charles Lehnert]]></dc:creator>
		<pubDate>Wed, 05 Feb 2014 03:32:33 +0000</pubDate>
		<guid isPermaLink="false">http://rommelsantor.com/clog/?p=334#comment-26357</guid>
		<description><![CDATA[Thanks so much for this. I&#039;m not going to change my whole site for IE7. I&#039;d much rather make IE7 comply with my site.]]></description>
		<content:encoded><![CDATA[<p>Thanks so much for this. I&#8217;m not going to change my whole site for IE7. I&#8217;d much rather make IE7 comply with my site.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rommel</title>
		<link>https://rommelsantor.com/clog/2012/03/12/fixing-the-ie7-submit-value/comment-page-1/#comment-26016</link>
		<dc:creator><![CDATA[rommel]]></dc:creator>
		<pubDate>Wed, 09 Oct 2013 13:00:54 +0000</pubDate>
		<guid isPermaLink="false">http://rommelsantor.com/clog/?p=334#comment-26016</guid>
		<description><![CDATA[Hi Florian-

That makes sense but it&#039;s interesting that I&#039;ve never encountered that issue. I&#039;ve updated the code to include your edit.

Thanks for reporting this!]]></description>
		<content:encoded><![CDATA[<p>Hi Florian-</p>
<p>That makes sense but it&#8217;s interesting that I&#8217;ve never encountered that issue. I&#8217;ve updated the code to include your edit.</p>
<p>Thanks for reporting this!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Florian Kammermann</title>
		<link>https://rommelsantor.com/clog/2012/03/12/fixing-the-ie7-submit-value/comment-page-1/#comment-26015</link>
		<dc:creator><![CDATA[Florian Kammermann]]></dc:creator>
		<pubDate>Wed, 09 Oct 2013 11:51:45 +0000</pubDate>
		<guid isPermaLink="false">http://rommelsantor.com/clog/?p=334#comment-26015</guid>
		<description><![CDATA[I had to put a &quot;return false&quot; after the submit trigger to avoid a double post:

$(f).trigger(&#039;submit&#039;);  
return false;]]></description>
		<content:encoded><![CDATA[<p>I had to put a &#8220;return false&#8221; after the submit trigger to avoid a double post:</p>
<p>$(f).trigger(&#8216;submit&#8217;);<br />
return false;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rommel</title>
		<link>https://rommelsantor.com/clog/2012/03/12/fixing-the-ie7-submit-value/comment-page-1/#comment-25563</link>
		<dc:creator><![CDATA[rommel]]></dc:creator>
		<pubDate>Wed, 08 May 2013 16:39:12 +0000</pubDate>
		<guid isPermaLink="false">http://rommelsantor.com/clog/?p=334#comment-25563</guid>
		<description><![CDATA[Is this because you&#039;re having an issue of the button&#039;s label being submitted as the value for the name? Interesting if so, as I haven&#039;t had that happen.

Just removing the &quot;name&quot; attribute won&#039;t be a complete fix because then the submission won&#039;t work on a subsequent click. (This could happen if, for example, you canceled the submission after clicking.)

I&#039;ve implemented a fix in the code above. Thanks!]]></description>
		<content:encoded><![CDATA[<p>Is this because you&#8217;re having an issue of the button&#8217;s label being submitted as the value for the name? Interesting if so, as I haven&#8217;t had that happen.</p>
<p>Just removing the &#8220;name&#8221; attribute won&#8217;t be a complete fix because then the submission won&#8217;t work on a subsequent click. (This could happen if, for example, you canceled the submission after clicking.)</p>
<p>I&#8217;ve implemented a fix in the code above. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie Kitson</title>
		<link>https://rommelsantor.com/clog/2012/03/12/fixing-the-ie7-submit-value/comment-page-1/#comment-25562</link>
		<dc:creator><![CDATA[Jamie Kitson]]></dc:creator>
		<pubDate>Wed, 08 May 2013 16:19:03 +0000</pubDate>
		<guid isPermaLink="false">http://rommelsantor.com/clog/?p=334#comment-25562</guid>
		<description><![CDATA[You need to add $(this).removeAttr(&quot;name&quot;); immediately before the submit.]]></description>
		<content:encoded><![CDATA[<p>You need to add $(this).removeAttr(&#8220;name&#8221;); immediately before the submit.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rommel</title>
		<link>https://rommelsantor.com/clog/2012/03/12/fixing-the-ie7-submit-value/comment-page-1/#comment-25469</link>
		<dc:creator><![CDATA[rommel]]></dc:creator>
		<pubDate>Sat, 26 Jan 2013 00:02:33 +0000</pubDate>
		<guid isPermaLink="false">http://rommelsantor.com/clog/?p=334#comment-25469</guid>
		<description><![CDATA[You can&#039;t submit a form using an &lt;code&gt;a&lt;/code&gt; tag without JavaScript.]]></description>
		<content:encoded><![CDATA[<p>You can&#8217;t submit a form using an <code>a</code> tag without JavaScript.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>https://rommelsantor.com/clog/2012/03/12/fixing-the-ie7-submit-value/comment-page-1/#comment-25468</link>
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Fri, 25 Jan 2013 22:24:17 +0000</pubDate>
		<guid isPermaLink="false">http://rommelsantor.com/clog/?p=334#comment-25468</guid>
		<description><![CDATA[Why not just add a  in youtrcode?]]></description>
		<content:encoded><![CDATA[<p>Why not just add a  in youtrcode?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rommel</title>
		<link>https://rommelsantor.com/clog/2012/03/12/fixing-the-ie7-submit-value/comment-page-1/#comment-25307</link>
		<dc:creator><![CDATA[rommel]]></dc:creator>
		<pubDate>Fri, 07 Sep 2012 14:57:39 +0000</pubDate>
		<guid isPermaLink="false">http://rommelsantor.com/clog/?p=334#comment-25307</guid>
		<description><![CDATA[Nice idea, Andy, however the &quot;type&quot; attribute is optional on the button element and is very often excluded by developers, and by default, every button submits its form.

However, it might be a good idea to modify it so that if the &quot;type&quot; attribute is specified and it is &lt;i&gt;not&lt;/i&gt; &quot;submit&quot; then it should not trigger form submission. I&#039;ll make that change to the code above.

Thanks!]]></description>
		<content:encoded><![CDATA[<p>Nice idea, Andy, however the &#8220;type&#8221; attribute is optional on the button element and is very often excluded by developers, and by default, every button submits its form.</p>
<p>However, it might be a good idea to modify it so that if the &#8220;type&#8221; attribute is specified and it is <i>not</i> &#8220;submit&#8221; then it should not trigger form submission. I&#8217;ll make that change to the code above.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Holland</title>
		<link>https://rommelsantor.com/clog/2012/03/12/fixing-the-ie7-submit-value/comment-page-1/#comment-25305</link>
		<dc:creator><![CDATA[Andy Holland]]></dc:creator>
		<pubDate>Fri, 07 Sep 2012 12:22:04 +0000</pubDate>
		<guid isPermaLink="false">http://rommelsantor.com/clog/?p=334#comment-25305</guid>
		<description><![CDATA[This is a great workaround for IE7 buggy behaviour.

I&#039;d suggest that the code should be:

$(&#039;form button[type=&quot;submit&quot;]&#039;)

rather than just $(&quot;form button&quot;), which avoids submitting the form for click buttons and reset buttons.]]></description>
		<content:encoded><![CDATA[<p>This is a great workaround for IE7 buggy behaviour.</p>
<p>I&#8217;d suggest that the code should be:</p>
<p>$(&#8216;form button[type=&#8221;submit&#8221;]&#8217;)</p>
<p>rather than just $(&#8220;form button&#8221;), which avoids submitting the form for click buttons and reset buttons.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis</title>
		<link>https://rommelsantor.com/clog/2012/03/12/fixing-the-ie7-submit-value/comment-page-1/#comment-25163</link>
		<dc:creator><![CDATA[Dennis]]></dc:creator>
		<pubDate>Wed, 15 Aug 2012 08:29:23 +0000</pubDate>
		<guid isPermaLink="false">http://rommelsantor.com/clog/?p=334#comment-25163</guid>
		<description><![CDATA[Great fix, thanks!]]></description>
		<content:encoded><![CDATA[<p>Great fix, thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonkemon</title>
		<link>https://rommelsantor.com/clog/2012/03/12/fixing-the-ie7-submit-value/comment-page-1/#comment-23501</link>
		<dc:creator><![CDATA[Jonkemon]]></dc:creator>
		<pubDate>Fri, 25 May 2012 10:16:48 +0000</pubDate>
		<guid isPermaLink="false">http://rommelsantor.com/clog/?p=334#comment-23501</guid>
		<description><![CDATA[Hey there,

Been very handy dealing with a classic pesky IE7 issue

Thanks!
j]]></description>
		<content:encoded><![CDATA[<p>Hey there,</p>
<p>Been very handy dealing with a classic pesky IE7 issue</p>
<p>Thanks!<br />
j</p>
]]></content:encoded>
	</item>
</channel>
</rss>
