<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
The child component should have an ajax callback, then. It doesn't need to be in a form necessarily.<div><br></div><div>It could look something like this:</div><div><br></div><div>html textInput</div><div> callback: [:v | self doSomethingWithValue: v ];</div><div> onChange:/onBlur:/onEnter: (html jQuery ajax serializeThis).</div><div><br></div><div>That would serialize it, but I imagine you want it to do something, so you could further modify it this way:</div><div><br></div><div>html textInput</div><div> callback: [ ... ];</div><div> onEnter: (html jQuery ajax serializeThis onSuccess: (html jQuery ajax script: [:s | s add: (self doSomethingOn: s) ].</div><div><br></div><div>RS</div><div><br><div>> Date: Wed, 5 Oct 2011 20:43:40 -0400<br>> From: ljw1001@gmail.com<br>> To: seaside@lists.squeakfoundation.org<br>> Subject: [Seaside] Ajax Posting with JQuery: An example?<br>> <br>> Hi,<br>> <br>> I need to make an Ajax post using JQuery, with Seaside for my server.<br>> I've found a number of Seaside JQuery examples (no posts though) and<br>> lots of JQuery post examples (no seaside). In the JQuery examples you<br>> specify the URL you're posting to, but that would be wrong in Seaside.<br>> <br>> Here's the use case. I have a large table of data. Each cell contains<br>> an anchor and clicking on the anchor converts the cell to a TextInput<br>> field. Now I need to submit that field's value, in an Ajaxy way, so I<br>> only refresh the single cell of the table.<br>> <br>> A simplified version of the current code looks like this:<br>> <br>> renderContentOn: html        <br>>         | child |<br>>         child := myTextEditor<br>>                                 valueBlock: [ object value ]<br>>                                 callback: [ :value | object setValue: value ]<br>> <br>>         html anchor<br>>                 onClick: ((html jQuery this) load html: [ :r | r render: child ]);<br>>                 with: ( object value).        <br>> <br>> I'm assuming the solution involves modifying the callback in my<br>> 'child' to post using JQuery. if anyone could explain in a bit more<br>> detail what the callback and the server code should look like it would<br>> be a big help.<br>> <br>> PS: It would also make a good addition to Dynamic Web Development with<br>> Seaside's draft JQuery chapter so you'd probably be helping a lot of<br>> people ;)<br>> <br>> Thanks much.<br>> <br>> Larry<br>> _______________________________________________<br>> seaside mailing list<br>> seaside@lists.squeakfoundation.org<br>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br></div></div>                                            </div></body>
</html>