Right, i have been trying various things with mixed success. I am
trying this: -
echo $javascript->event("test123", "blur", "new Ajax.Request('/cms/
function/test123', {parameters: Form.serialize('test123')} );",
false);
but i then get an error: -
$(form).getElements is not a function
http://www.mr-philp.co.uk/cms/js/prototype.js
Line 1690
Now from this error it would beeasy to assume that my prototype
library is in some way icorrectly installed, but all my other Ajax
code is working (and there's lots of it) so i don't believe this is
the case. Has anyone else had this error?
Cheers
On 16 Mar, 16:00, "bernardo" <[EMAIL PROTECTED]> wrote:
> It would be helpful if you can give more details of where exactly are
> you having problems: can you capture the event? can you make the ajax
> request and send the data to the controller? can you save the data?
>
> A straightforward way could be adding this to your view:
>
> <?= $javascript->codeBlock(<<<EOD
> $('ControllerTextareaid').observe('blur',function() {
> new Ajax.Request('/controller/savetextarea', {
> parameters: Form.serializeElements([$('ControllerId'),$
> ('ControllerTextareaid')])
> });
> });
> EOD
> ); ?>
>
> Note that this sends only the id and the textareafields.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---