Hi group,
i used the following code in my view:

$ajax->submit()

which generated something like:

<input type="submit" url="/posts/mymethod" value="Search"
id="submit881124296" onclick="event.returnValue = false; return
false;" /></div><script type="text/javascript">
//<![CDATA[
Event.observe("submit881124296", 'click', function(event) { new
Ajax.Updater('resultDiv','/posts/mymethod', {asynchronous:true,
evalScripts:true, onComplete:function(request, json) { alert(json);
myfunction(json); }, parameters:Form.serialize(Event.element
(event).form), requestHeaders:['X-Update', 'resultDiv']}) }, false);
//]]>
</script>

all works as expected, however what i want i to get some data from
mymethod (defined in posts controller) as a Json object and use it in
my JavaScript function "myfunction(json);" i can see that object
called "json" is already there, however it is set to NULL!!!

please help!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to