Note that there are some explanatory texts on larger screens.

plurals
  1. POIE sends inner HTML when clicking on a button element
    primarykey
    data
    text
    <p>I have the following html in my webpage (simplified).</p> <pre><code>&lt;button type="submit" name="action" value="ButtonA"&gt;Click Here&lt;/button&gt; </code></pre> <p>In Firefox, it submits "ButtonA" as the value for the "action" form value. However, in IE7, it submits "Click Here". Is there any way to resolve this? I don't want to use input tags, because I need to be able to customize the text without affecting the values sent back to the form (localization). Basically, I want to be able to have multiple buttons with the same name, and depending on their value, do a different action when submitted. Is there any easy with to get IE to act correctly in this case?</p> <p>[MORE]</p> <p>Maybe I should be more clear, but I can't use</p> <pre><code>&lt;input type="submit" name="Action" value="ButtonA"&gt; </code></pre> <p>because I need to be able to change the text displayed for localization rules, without affecting the actual value of the button that's submitted with the form.</p> <p>[MORE]</p> <p>To elaborate even more, Basically, I want the button to be able to say "Save" or "Sauver" depending on the language, but not have the value submitted to the server change. I also want to have multiple buttons with the same name, and depending on the value, do something, rather than depending on the button name, and testing if there is a value for that button. The code is already written from that perspective, and I just want to be able to change the displayed text in the values, without existing server side processing code.</p> <p>Here is a link with a very good <a href="http://allinthehead.com/retro/330/coping-with-internet-explorers-mishandling-of-buttons" rel="noreferrer">explanation of the problem</a>, with some possible work arounds.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload