javascript - cakephp - ajax request and action 'edit' does not work in simultaneous -


i'm using ajax ($this->js->get) select element of dropdownlist and, then, populate other dropdownlist. but, have dropdownlists inside form->create('user').

so, if use form->create(false) action 'edit' doesnt work... on other hand, if use form->create('user') 'ajax' doesnt work.

<?php echo $this->form->create('user', array('action' => 'edit')); ?> <table>         <tr>             <th>project</th>             <th>version</th>         </tr>           <tr>             <td>   <?php                  echo $this->form->select('projects', array($projects), array('multiple' => false,                     'class' => 'span2',                     'id' => 'projectstest'));                 ?>             </td>                   <td>                  <?php                 echo $this->form->select('projectversions', array($projectversions), array('multiple' => false, 'class' => 'span2',                     'id' => 'projectversionstest'));                 ?>             </td>         </tr> </table>   <?php echo $this->form->button('alterar', array('type' => 'submit', 'class' => "btn btn-info pull-right")); ?>   <?php $this->js->get('#projectstest')->event('change', $this->js->request(array(             'controller' => 'projectversions',             'action' => 'getversionsofproject'                 ), array(             'update' => '#projectversionstest',             'async' => true,             'method' => 'post',             'dataexpression' => true,             'data' => $this->js->serializeform(array(                 'isform' => true,                 'inline' => true             )) )));   echo $this->form->end(); ?> 

how can resolve problem?

thanks in advance :)

shouldn't work?

echo $this->form->create(null, array(     'url' => array('controller' => 'users', 'action' => 'edit') )); 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -