<div>
                    Hi Dario,
                </div><div><br></div><div>please read the documentation about ajaxError:&nbsp;http://api.jquery.com/ajaxError/ it suggests that you check the parameters to the function.&nbsp;</div><div>You can either convert the script to a function by sending #asFunction: and provide an array of variable names, or you add that script in your file library like so:</div><div>jQuery(function($){</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>$(document).ajaxError(function(event, jqXHR, ajaxSettings, thrownError) {</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>alert("error " + thrownError);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>});</div><div>});</div>
                <div><div>That'll also register the event handler and be not so difficult to read. Downside is that you cannot easily send that back to the server as you don't have a callback URL at hand, but for debugging purposes that should be fine.</div><div><br></div><div>Kind Regards</div><div>Karsten</div><div><br></div>--&nbsp;<br><div>Karsten Kusche - Dipl. Inf. (FH) - karsten@heeg.de</div><div>Georg Heeg eK - Köthen</div><div>Handelsregister: Amtsgericht Dortmund A 12812&nbsp;</div><div><br></div></div>
                 
                <p style="color: #A0A0A8;">Am Mittwoch, 5. Juni 2013 um 14:55 schrieb dtrussardi@tiscali.it:</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
                    <span><div><div>Ciao,&nbsp;<div><br><div>with the Ryan changes all works fine.</div><div><br></div><div><br><blockquote type="cite"><div><div>Hi Dario,</div>
<div>I think the trouble is that when you have two or more ajax scripts to be run you are not guaranteed which will run first. If you use a callback and send serializeThis to the ajax object, it runs before any scripts:</div>

<div>&nbsp;</div>
<div>html anchor</div>
<div>&nbsp;&nbsp; callback: [ self setIndex: aValue ];</div>
<div>&nbsp;&nbsp; onClick: (html jQuery ajax</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; serializeThis;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; script: [ :s |&nbsp;(s jquery: anId) html: [ :h | self renderStuffOn: h ].</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; s &lt;&lt; (s jQuery: anId2) html: [ :h | self renderSomeOtherStuffOn: h ]&nbsp;]...<br></div></div></blockquote><div><br></div><div>I think the use of callback is more clear but some test id do don't solve the problematic.</div><div><span style="white-space: pre; "> </span></div><div>At the top of my rendering i have this code :</div><div><br></div><div><span style="white-space:pre">                 html document addLoadScript: (html jQuery ajaxSetup
                                onError: (html javascript
                                  alert: 'The session erase a jq error.'</span><span style="white-space: pre;">&nbsp;))</span><br></div><div><span style="white-space: pre;"><br></span></div><div><span style="white-space: pre;">and when i work with callback the system erase the alert.</span></div><div><span style="white-space: pre; "><br></span></div><div><span style="white-space: pre; ">How i  can use the callback  in this problematic, or the Ryan indications is the only solution.</span></div><div><span style="white-space: pre; "><br></span></div><div><span style="white-space: pre; "><span style="white-space:pre">        </span>Thanks,</span></div><div><span style="white-space: pre; "><br></span></div><div><span style="white-space: pre; "><span style="white-space:pre">                </span>Dario</span></div><div><br></div><blockquote type="cite"><div>
<div>Regards,</div>
<div>John<br></div>
<div>On Wed, Jun 5, 2013 at 4:40 AM, <span dir="ltr">&lt;<a href="mailto:dtrussardi@tiscali.it" target="_blank">dtrussardi@tiscali.it</a>&gt;</span> wrote:<br><blockquote type="cite"><div>
<div style="WORD-WRAP:break-word">
<div>Ciao,</div>
<div><br></div>
<div>i have &nbsp;a anchor based on this code:</div>
<div><span style="WHITE-SPACE:pre-wrap"></span></div>
<div><span style="WHITE-SPACE:pre-wrap"></span>html anchor</div>
<div><span style="WHITE-SPACE:pre-wrap"></span>script: (html jQuery this button</div>
<div><span style="WHITE-SPACE:pre-wrap"></span>text: true;</div>
<div><span style="WHITE-SPACE:pre-wrap"></span>primaryIcon: &nbsp;'ui-icon-circle-plus'</div>
<div><span style="WHITE-SPACE:pre-wrap"></span>title: 'Successivo');</div>
<div><br></div>
<div><span style="WHITE-SPACE:pre-wrap"></span>onClick: (html jQuery ajax</div>
<div><span style="WHITE-SPACE:pre-wrap"></span><span style="WHITE-SPACE:pre-wrap"></span>( html jQuery ajax&nbsp;</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="WHITE-SPACE:pre-wrap"></span>script: [ :s | <span style="WHITE-SPACE:pre-wrap"></span>s &lt;&lt; (s jQuery: &nbsp;#'base') load html:[:h|<b> <span style="WHITE-SPACE:pre-wrap"></span>"A"<span style="WHITE-SPACE:pre-wrap"> </span>self incrementaIndex: true.</b>&nbsp;</div>

<div><span style="WHITE-SPACE:pre-wrap"></span>"B1"<span style="WHITE-SPACE:pre-wrap"> </span><span style="WHITE-SPACE:pre-wrap"></span>(self renderingBaseOn: &nbsp;h)].<span style="WHITE-SPACE:pre-wrap"> </span></div>

<div><br></div>
<div><span style="WHITE-SPACE:pre-wrap"></span><span style="WHITE-SPACE:pre-wrap"></span>s &lt;&lt; (s jQuery: #'orarioRiferimento') load html:[:h| <span style="WHITE-SPACE:pre-wrap"></span>&nbsp;"B2"<span style="WHITE-SPACE:pre-wrap"> </span>( self renderOrarioRiferimentoOn: h)]]);<span style="WHITE-SPACE:pre-wrap"> </span></div>

<div><span style="WHITE-SPACE:pre-wrap"></span>with: '&gt;'.</div>
<div><br></div>
<div><br></div>
<div>My objective when a user click on this anchor is:</div>
<div><br></div>
<div><span style="WHITE-SPACE:pre-wrap"></span>A)&nbsp;<span style="WHITE-SPACE:pre-wrap"> </span>&nbsp;update a index &nbsp;with the&nbsp;&nbsp;<span style="WHITE-SPACE:pre-wrap"> </span><b>self incrementaIndex: true.</b></div>
<div><br></div>
<div><span style="WHITE-SPACE:pre-wrap"></span>B1)&nbsp;<span style="WHITE-SPACE:pre-wrap"> </span>update the div #base with:<span style="WHITE-SPACE:pre-wrap"> </span>&nbsp;<span style="WHITE-SPACE:pre-wrap"> </span>&nbsp;self renderingBaseOn: h</div>

<div><br></div>
<div><span style="WHITE-SPACE:pre-wrap"></span>B2) update the div #orarioRiferimento&nbsp;<span style="WHITE-SPACE:pre-wrap"> </span>with:<span style="WHITE-SPACE:pre-wrap"> </span>&nbsp;self renderOrarioRiferimentoOn: h</div>
<div><br></div>
<div><br></div>
<div>Where the B1 - B2 &nbsp;rendering is based on the index state.</div>
<div><br></div>
<div>Now i have a&nbsp;strange behavior because sometime the B2<span style="WHITE-SPACE:pre-wrap"> </span>&nbsp;div #orarioRiferimento<span style="WHITE-SPACE:pre-wrap"> </span>&nbsp;renderings is not aligned to the index.</div>
<div><br></div>
<div>As if the onClick script action &nbsp;is not execute&nbsp;in the&nbsp;definition&nbsp;sequence.</div>
<div><br></div>
<div><br></div>
<div>Any suggestions ?</div>
<div><br></div>
<div>What is the right definition to solve this problematic type ?</div>
<div><br></div>
<div><span style="WHITE-SPACE:pre-wrap"></span>Thanks,</div>
<div><br></div>
<div><span style="WHITE-SPACE:pre-wrap"></span>Dario</div>
<div><br></div>
<div><br></div></div><br>_______________________________________________<br>seaside mailing list<br><a href="mailto:seaside@lists.squeakfoundation.org">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>
<br></div></blockquote></div><br><br clear="all"><br>-- <br><a href="http://jmck.seasidehosting.st/" target="_blank">jmck.seasidehosting.st</a>  
_______________________________________________<br>seaside mailing list<br><a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br><a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br></div></blockquote></div><br></div></div><div><div>_______________________________________________</div><div>seaside mailing list</div><div><a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a></div><div><a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a></div></div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div>