<div><br>Well I&#39;ll guessing this reponse but Im deduce this form html code :)</div><div><br></div><div>the deault acction is implemented by a hidden submit input.. &lt;input type=&quot;submit&quot; class=&quot;submit&quot; style=&quot;position: absolute; top: -100em;&quot; name=&quot;7&quot; value=&quot;Default&quot; tabindex=&quot;-1&quot;&gt;.. in a hidden div or a text input if your browser is explorer.</div>
<div><br></div><div>In other situation when you press enter the post have your field values and the variable 7=Default,,, 7 is an id on the fly generated. that value identify the default block in the WeakDictionary of the session.</div>
<div><br></div><div>When you do submit via jquery the &quot;7&quot; field is&#39;nt setting, because, nothing happend when you are do submit via Jquery.</div><div><br></div><div>For obteing your expecting behiavior i suggest 3 way.</div>
<div><br></div><div>1. Extend WAFormTag for obteing or assing the id for the default action control, and then do submit</div><div>2. Or Implement you own hidden button.</div><div>3. Obteing the id and value to defaultAction continuation and set this variable en your post..</div>
<div><br></div><div>That Solution don&#39;t be beatyfull but must work..</div><div><br></div><div>Best.</div><div><br></div><div><br></div><div><br><div class="gmail_quote">On Wed, Mar 16, 2011 at 7:27 PM, Esteban Lorenzano <span dir="ltr">&lt;<a href="mailto:estebanlm@gmail.com" target="_blank">estebanlm@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
I&#39;m trying to add a &quot;confirmation dialog&quot; using jQuery in a form, and calling submit from a jquery statement is not working properly (or at least, is not working as I was hoping to work). If I submit the form using javascript, I was expecting #defaultAction: to be called, but no :(<br>


<br>
Does anybody knows how can I do this properly?<br>
<br>
In the example, I render a dialog (with a form), then a form, and the &quot;accept&quot; button opens the dialog. The accept button in the dialog triggers my confirmation dialog and on complete submits the original form.<br>


<br>
This is the code:<br>
<br>
renderDialogCollectExtraInfoOn: html<br>
        | dialogId formId dialogFormId |<br>
<br>
        dialogId := html nextId.<br>
        dialogFormId := html nextId.<br>
        formId := html nextId.<br>
<br>
        html heading<br>
                level2;<br>
                with: &#39;Collect extra information in confirmation dialog&#39;.<br>
<br>
        html div<br>
                id: dialogId;<br>
                script: (html jQuery this dialog<br>
                        title: &#39;Dialog with extra info&#39;;<br>
                        resizable: false;<br>
                        modal: true;<br>
                        autoOpen: false;<br>
                        addButton: &#39;Accept&#39; do: (html jQuery ajax<br>
                                serializeForm: (html jQuery id: dialogFormId);<br>
                                onComplete: ((html jQuery id: formId) call: &#39;submit&#39;));<br>
                        addButton: &#39;Cancel&#39; do: (html jQuery this dialog close));<br>
                with: [<br>
                        html form<br>
                                id: dialogFormId;<br>
                                with: [<br>
                                        html checkbox<br>
                                                on: #confirm1 of: self;<br>
                                                with: &#39;Confirm 1&#39; ] ].<br>
<br>
        html form<br>
                id: formId;<br>
                defaultAction: [ self halt. self inform: &#39;Ok&#39;. &quot;I&#39;m expecting this to be executed&quot; ];<br>
                with: [<br>
                        html text: &#39;Some text: &#39;.<br>
                        html textInput on: #text of: self.<br>
<br>
                        html button<br>
                                onClick: (html javascript<br>
                                        add: ((html jQuery id: dialogId) dialog open);<br>
                                        add: (JSStream on: &#39;return false&#39;);<br>
                                        yourself);<br>
                                callback: [ self halt. &quot;I&#39;m not expecting this to be executed&quot; ];<br>
                                with: &#39;Accept&#39; ]<br>
<br>
Thanks,<br>
Esteban_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</blockquote></div><br></div>