Pages

Showing posts with label multiple. Show all posts
Showing posts with label multiple. Show all posts

Sunday, June 9, 2013

Cakephp-Send Multiple elements in ajax request frpm ajaxhelper/jshelper

From the following post

http://itfeast.blogspot.in/2013/06/cakephp-20-create-0bserve-field.html

To send multiple elements in ajax request from ajaxhelper/jshelper

 'data'=>$(\'#category,#sort\');  

For example this is how I passed the same in cakephp
  <script type="text/javascript">  
            <?php   
              echo $this->Js->get('#category')->event('change',$this->Js->request(  
                  array('controller' => 'contributors', 'action' => 'changevideos'),  
                  array('update'=>'#vediocontainer','async' => true,'dataExpression' => true,'method' => 'post','data'=>'$(\'#category,#sort,#fileid\').serializeArray()')  
                  ),false);  
             ?>  

Sunday, June 26, 2011

Cakephp:send multople elements values in observe field

$options=>array('url'=>array('controller'=>'admin','action'=>'update_list'),'update'=>'divIdToUpdate','frequency'=>'0.2','with'=>'Form.serialize elements($('elementid1','elementid2,elementid3')));

echo $this->Ajax->observefield('Schedulepart',$options);

Cakephp:Selecting Multiple Entries from a list

use the following code

$this->Form->select('Model.name',$listarray,'selectedvalue',array('multiple'=>'multiple','size'=>'5');