Re: AJAX "with' option
Thanks for the tips nate and francky06l, you solved my problem. It would be great if this was included in the manual as I wasn't clear I had to add the serialize call myself. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: AJAX "with' option
Yes, that's if your form id is 'posty'. Otherwise, if you're only sending a particular form element, you'd use Form.Element.serialize. Sorry if that wasn't clear. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: AJAX "with' option
Hello, Tooks me a while but syntax in $ajax->submit or $ajax->remoteFunction is 'with' => 'Form.serialize("posty")' Franck --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: AJAX "with' option
or 'Form.Element.serialize("posty")' --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: AJAX "with' option
$('posty').value ? On 7/18/06, Matt <[EMAIL PROTECTED]> wrote: > > I am having trouble to get AJAX read the value a field by specifying > the "with" option. Below is the code in question:- > > > > > > > Topic Title > > Topic Text > name="data[Post][bbcode]"> echo $newtopic['Post']['bbcode']; ?> > > link('Preview', "http://www.google.com/";, array('url' > => 'post_preview', 'update' => 'preview', 'with' => 'posty')); ?> > > > > > Now what should happen is when the user clicks on the preview link, it > passes the current value of the textarea to the controller which then > returns a preview in the relevant div. However this isn't working as > according to the Firefox Javascript error log "Posty is not defined". > > I've done some reading up on the Prototype library's Ajax.Updater class > and think problem is the "with" parameter isn't serializing the values > like the manual suggests: > http://www.sergiopereira.com/articles/prototype.js.html#UsingAjaxUpdater > > As far as I can tell all the "with" parameter does is set the value of > "parameters" in the Ajax.Updater call, so the data still needs to be > extracted and serialized from the field. > > > > > -- Armando Sosa www.nolimit-studio.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---