Hello all,
I have a textbox that, onblur, needs to use ajax to call an action
with its value as a parameter.
now ideally this would be accomplished with
onblue="<?php echo $ajax->remoteFunction(array('url'=>array
('controller'=>'ratings','action'=>'rateItem',VALUE_GOES_HERE))); ?>"
I've tried replacing VALUE_GOES_HERE with 'this.value', this.value,
$javascript->codeBlock('this.value') and none of them work properly.
It seems like there would be a way to do this with cake. I've
currently solved the problem with a work around by taking the
javascript code generated by cake and copying and pasting it in place
of the $ajax->remoteFunction code. This way I can use this.value.
The result looks like this:
onblur = "new Ajax.Request('/charity/ratings/rateItem/' + this.value,
{asynchronous:true, evalScripts:true})"
This works... but I don't like breaking cake convention and it seems
as though there should be a "correct" way of doing this.
Does anybody know if there is?
Thanks in advance!
Dave
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to
[hidden email]
To unsubscribe from this group, send email to
[hidden email]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en-~----------~----~----~----~------~----~------~--~---