I don't know. As far as I know, all callback parameters are passed through in a GEt request when using callback: [:v ] json: javascript stuff.<div><br></div><div>I am trying to figure out how to use html jQuery post, but I am not sure on how to combine it with a callback. The only example i could find of post was in a test class which did nothing more than checking the output of the method. </div>
<div><br></div><div>the JQPost method only takes the arguments complete and dataType but in the JQuery documentation i could also specify a data parameters. Should I use jquery ajax with the post method instead of JQPost?</div>
<div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><div><br></div><div><br><div><br><div class="gmail_quote">2010/7/25 Lukas Renggli <span dir="ltr"><<a href="mailto:renggli@gmail.com">renggli@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Is there a reason why Seaside doesn't accept a POST-ed Ajax request?<br>
At least in Pharo it doesn't matter if you do your Ajax requests with<br>
GET (html jQuery get) or POST (html jQuery post).<br>
<br>
Lukas<br>
<div><div></div><div class="h5"><br>
On 25 July 2010 18:39, Bart Veenstra <<a href="mailto:bart.veenstra@gmail.com">bart.veenstra@gmail.com</a>> wrote:<br>
> Hi,<br>
> I am using Seaside 3.0 which is included in the VW7.7 image and am trying to<br>
> create a JQPlugin for jstree (<a href="http://www.jstree.com/demo" target="_blank">http://www.jstree.com/demo</a>).<br>
> I got the basic functionality working on the tree, but now I would like to<br>
> have the user create new nodes in the tree using hte context menu.<br>
> JSTree offers this functionality by binding a function to a create node<br>
> event.<br>
> (php example)<br>
> .bind("create.jstree", function (e, data) {<br>
> $.post(<br>
> "./server.php",<br>
> {<br>
> "operation" : "create_node",<br>
> "id" : data.rslt.parent.attr("id").replace("node_",""),<br>
> "position" : data.rslt.position,<br>
> "title" : <a href="http://data.rslt.name" target="_blank">data.rslt.name</a>,<br>
> "type" : data.rslt.obj.attr("rel")<br>
> },<br>
> function (r) {<br>
> if(r.status) {<br>
> $(data.rslt.obj).attr("id", "node_" + <a href="http://r.id" target="_blank">r.id</a>);<br>
> }<br>
> else {<br>
> $.jstree.rollback(data.rlbk);<br>
> }<br>
> }<br>
> );<br>
> })<br>
> In this javascript example, the parameters are sent to the server using a<br>
> JQuery Post. The second function takes care of the result and does a<br>
> rollback if the creation failed.<br>
> I want to have the the same functionality in seaside like this:<br>
> ((html jQuery id: treeId) tree)<br>
> plugins: #('json_data' 'themes' 'ui' 'contextmenu' 'dnd');<br>
> getChildrenBlock: [:node | self getChildren: node];<br>
> theme: 'default';<br>
> types: self treeTypes;<br>
> animation: 0;<br>
> createBlock: [:node :position :title :type | ] onSuccess: [:node :s |<br>
> ] onFail: [:ex :s | ]<br>
> The createBlock first argument holds the seaside translated objects from the<br>
> javascript call, the second should be executed when the first block executes<br>
> correctly and the third should be executed when the command failed. The<br>
> onSuccessBlock should also hold the newly created node and a script to do<br>
> something wiht the newly created node.<br>
> What is the best way to accomplish this using a post call instead of a get<br>
> call? I probably could get this running with a normal GET jquery callback,<br>
> but I am worried about the length of the get request when using proxies who<br>
> cut off long urls (this happens quite a lot unfortunatly)<br>
> I hope anyone could push me in the right direction.<br>
> Regards,<br>
><br>
> Bart Veenstra<br>
><br>
</div></div>> _______________________________________________<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>
><br>
<font color="#888888"><br>
<br>
<br>
--<br>
Lukas Renggli<br>
<a href="http://www.lukas-renggli.ch" target="_blank">www.lukas-renggli.ch</a><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>
</font></blockquote></div><br></div></div></div>