Hi,
I work with CakePHP just 2 years ago, and the prototype was my choice to
make XHR's, and a few things too. With cake 1.2 and prototype I could do XHR
so easy, but with cake 1.3.10 and jquery I'm doesn't having success.
Well, let's go to the problem.
I have 2 selects, one that populates other via ajax request, and I was
feeling a very dificult to make this works. The $this->data array is always
empty when the request reach my action in the controller.
My last try was this:
views/templates/add.ctp
<div class="templates form">
<?php echo $this->Form->create('Template');?>
<fieldset>
<legend><?php __('Add Template'); ?></legend>
<?php
echo $this->Form->select('table',$tables);
echo $this->Html->div('','',array('id'=>'divColumns'));
//Here that the "magic" doesn't working
echo
$this->Js->get('#TemplateTable')->event('change',$this->Js->request(array('controller'=>'columns','action'=>'getColumns'),array('update'=>'#divColumns','async'=>true)));
echo $this->Form->input('description');
?>
</fieldset>
<?php echo $this->Form->end(__('Submit', true));?>
</div>
<div class="actions">
<h3><?php __('Actions'); ?></h3>
<ul>
<li><?php echo $this->Html->link(__('List Templates', true),
array('action' => 'index'));?></li>
</ul>
</div>
Anyone have a idea how do I do this?
Thanks and best regards.
--
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