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
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
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
$('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:- div id=preview /div form method=post action=?php echo $html-url('/forums/new_topic/?forum='.$forum_id); ? Topic Title input name=data[Topic][title] value=?php if(isset($newtopic['Topic']['title'])) echo $newtopic['Topic']['title']; ?/ Topic Textbr / textarea id=posty cols=40 rows=15 name=data[Post][bbcode]?php if(isset($newtopic['Post']['bbcode'])) echo $newtopic['Post']['bbcode']; ?/textarea ?php echo $ajax-link('Preview', http://www.google.com/;, array('url' = 'post_preview', 'update' = 'preview', 'with' = 'posty')); ? input type=submit name=send value=Send / /form 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 -~--~~~~--~~--~--~---
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 -~--~~~~--~~--~--~---