Why does my dynamic form submit not use the jQuery-replaced button label value?
<pre><code>&lt;button class="gocrazy" label="1"/&gt;
&lt;button class="gocrazy" label="2"/&gt;
&lt;button class="gocrazy" label="3"/&gt;

&lt;form id="crazyform" method="POST" action="/crazyform"&gt;
&lt;input type="hidden" id="crazyreplace" value="REPLACE WITH BUTTON LABEL ON CLICK"&gt;
&lt;/form&gt;

$(".gocrazy").button();

$(".gocrazy").click( function(event)
{   
    var gocrazy = $(this).attr("label");
    $("#crazyreplace").val(gocrazy);
    $("form#crazyform").submit();
    return false;
});
</code></pre>

<p>I want to submit this form with a value replaced from the button label (1, 2 or 3) into the hidden <code>crazyreplace</code> field using jQuery.</p>

<p>But the form is submitted with the original text message (<code>REPLACE WITH BUTTON LABEL ON CLICK</code>).</p>

<p>What is wrong here?</p>
