My multiple div update works but it duplicates the information when I
click on the submit botton
I have a page loading from the controller index
$this->render('firstload');
the firstload has this information
echo $ajax->form('Worker', 'post', array('model' => 'Worker',
'url' => '/workers/update1', 'update' => array('dynamic1',
'dynamic1T' )));
echo $form->input('Test');
echo $form->submit('submit');
echo $form->end();
echo $ajax->div('dynamic1T');
echo ' top part ';
echo $ajax->divEnd('dynamic1T');
echo $ajax->div('dynamic1');
echo ' passinfo ';
echo $ajax->divEnd('dynamic1');
and the update1.ctp page has this data
echo $ajax->div('dynamic1T');
echo ' top part updated ';
echo $ajax->divEnd('dynamic1T');
echo $ajax->div('dynamic1');
echo '<table><tr>
<td>fffff</td>
</tr></table>';
echo $ajax->divEnd('dynamic1');
So when I hit the submit button I end up with
top part updated
fffff
top part updated
fffff
It works as expected when updating only one div
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php