> i want to have only ONE code logic for addUser, thats why i use
innerHTML to add the html code within the addUser-div only if its
necessary.

Do you understand what does this code?
<?php echo $cakex->link('Add new item', '/phases/formAdd/',
array('update' => 'add')); ?>
It renders link, which will cause that rendered content will be not
dropped, but it will be grabbed and with response->assign() assigned
to innerHTML property of element with 'add' id. So only markup you
should add (besides of this link) is <div id="add"></div>

There are other possible ways, for example create CakeX plugin, which
will utilize afterRender() callback, get content of output buffer and
'append' it somewhere (instead of 'assign')...

You're in CakePHP community now, so I think that CakeX does it's job
well - it brings new people here ;) BUT: it is better to use another
JS library with CakePHP (I prefer jQuery). I understand your position
- you're familiar with xajax already and you want to utilize this
knowledge as much as possible... But you should know that xajax
philosophy, request flow etc is in conflict with CakePHP and CakeX
code have to deal with those incompatibilities internally...

With some exceptions, I am using CakeX _only_ for simple things, where
I want to use beauty of xajaxResponse methods and xajax plugins - and
I propose to you exactly same thing.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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