<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'>No problem. I'll just add that there's plenty of ways you can chain and link events, but you wanna make sure you serialize first so the data is there. I just happen to like the (latter) method. It works for me.<br><br>RS<br><br>> Date: Thu, 6 Oct 2011 21:54:44 -0400<br>> Subject: Re: [Seaside] Ajax Posting with JQuery: An example?<br>> From: ljw1001@gmail.com<br>> To: seaside@lists.squeakfoundation.org<br>> <br>> That was just the help I needed. Thanks!<br>> <br>> On Wed, Oct 5, 2011 at 10:51 PM, Robert Sirois <watchlala@hotmail.com> wrote:<br>> > The child component should have an ajax callback, then. It doesn't need to<br>> > be in a form necessarily.<br>> > It could look something like this:<br>> > html textInput<br>> >     callback: [:v | self doSomethingWithValue: v ];<br>> >     onChange:/onBlur:/onEnter: (html jQuery ajax serializeThis).<br>> > That would serialize it, but I imagine you want it to do something, so you<br>> > could further modify it this way:<br>> > html textInput<br>> >     callback: [ ... ];<br>> >     onEnter: (html jQuery ajax serializeThis onSuccess: (html jQuery ajax<br>> > script: [:s | s add: (self doSomethingOn: s) ].<br>> > RS<br>> >> 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>> ><br>> > _______________________________________________<br>> > seaside mailing list<br>> > seaside@lists.squeakfoundation.org<br>> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br>> ><br>> ><br>> _______________________________________________<br>> seaside mailing list<br>> seaside@lists.squeakfoundation.org<br>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br>                                            </div></body>
</html>