Hello,

I know this problem is discussed more than once, but can't find a
solution. Here is the situation: I want to update two (or more) html
elements with single ajax request through ilnk ($ajax->link). If link
updates single element (i.e. just one div) everything works fine,
problem occurs when link tries to update two or more elements. I build
the link in this way (in view file):

print $ajax->link('LinkTitle',
                        array('controller'=>'Emails', 'action'=>'delete'),
                        array('update'=>array('div1',  'div2')));

print $ajax->div('div1');
print $ajax->divEnd('div1');

print $ajax->div('div2');
print $ajax->divEnd('div2');

This code results in this html:

<a id="link2116879578" onclick=" event.returnValue = false; return
false;" href="/taxundo/Emails/delete">LinkTitle</a>
<script type="text/javascript">
<![CDATA[
Event.observe('link2116879578', 'click', function(event) { new
Ajax.Updater(document.createElement('div'),'/taxundo/Emails/delete',
{asynchronous:true, evalScripts:true, requestHeaders:['X-Update',
'div1 div2']}) }, false);
//]]>
</script>

Clicking on link nothing happens - not even a Javascript error in
Firebug console.
I've tried passing a prototype element ojbects in "update", but same
result.
Any help will be appreciated, thanks.

P.S. I didn't show controller snippets as it works fine - when
updating single div it's fine.
--~--~---------~--~----~------------~-------~--~----~
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