Thanks for the reply Leo, however I'm afraid it didn't seem to work!!!!

The generated javascript I'm now getting when I view source is this:

<script type="text/javascript">

Event.observe('menuForm', 'submit', function(event)
{ new Ajax.Updater('myHiddenDiv','/pages/updateMenusInSession',
        {asynchronous:true, evalScripts:true,
parameters:Form.serialize('menuForm'),
        requestHeaders:['X-Update', 'myHiddenDiv']}) }, false);

</script>

and my hidden div is this:
<div id="myHiddenDiv" name="myHiddenDiv" style="display:none;"></div>

The result is that the browser is still is navigating to
/pages/updateMenusInSession rather than going to the page in the "<a
href=" tag !!!!!


leo.cacheux wrote:
> I think you could use a hidden DIV (with "display:none") to put the
> result of the Ajax request :
>
> echo $ajax->form('/pages/updateMenusInSession', 'post', array("id" =>
> "menuForm", "update"=>"myHiddenDiv"));


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to