Hello,

I'm trying to make ajax calls and requests with new CakePHP 1.3 helpers 
(especially JsHelper) and Jquery. Here is what I do:

a simple select box:
echo $this->Form->input('Sync.selection', 
    array('type'=>'select', 
        'options'=>$sync_elements, 
        'id'=>'selection', 
        'label'=>'What will sync'));

and the code for ajax call
$this->Js->get('#selection')->event('change', 
    $this->Js->request(array('controller'=>'Syncs', 
                            'action'=>'syncSelection'), 
                    array('async'=>true, 
                        'method'=>'post',
                        'type'=>'json',
                        'update'=>'#result'));

I have two problems with this code:
1. It doesn't matter what type (html or json) I write, the resulting jquery 
code is always "dataType: "html""
2. Using method=post doesn't work - no requests are made (according to 
apache access logs) and nothing happens on select box change. If I change 
method to get it works.

Any ideas on this?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to