Pages

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);  
             ?>  

2 comments:

  1. Hey Gaurav,

    My product Is Magento Module Ajax Cart

    As I perform Multiple elements by using the above code,the Ajax request is fired.

    Could you please help me?

    ReplyDelete
    Replies
    1. Hi Kathy

      Can you tell us what error you are getting or even better if you can post THE code which makes an Ajax request

      Delete