<?php echo $this->Form->create('Property',array <http://www.php.net/array>(
'id'=>'add_property'));?>
 
<?$data = $this->Js->get('#add_property')->serializeForm(
                                            array <http://www.php.net/array>
(
                                            'isForm' => true,
                                            'inline' => true)
                                                );?>
           <? echo $this->Js->submit('submit.png',
            array <http://www.php.net/array>('id'=>'submit_id',
                'update' => '#right_side_content', // element to update
                'data'=>$data,
            'before' => $this->Js->get('#submit_busy-indicator')->effect(
'fadeIn', array <http://www.php.net/array>('buffer' => false)),
       'complete' => $this->Js->get('#submit_busy-indicator')->effect(
'fadeOut', array <http://www.php.net/array>('buffer' => false)),           
            
     ));?>
 
 
Generates the following code:
 
$(document).ready(function () {$("#submit_id").bind("click", function 
(event) {$.ajax({beforeSend:function (XMLHttpRequest) {$("#submit_b
usy-indicator").fadeIn();}, complete:function (XMLHttpRequest, textStatus) 
{$("#submit_busy-indicator").fadeOut();}, 
data:$("#submit_id").closest("form").serialize(), dataType:"html", 
success:function (data, textStatus) {$("#right_side_content").html(dat
a);}, type:"POST", url:"\/cakeapp\/property\/add_property"});
return false;});});
 
Shouldn't this line 
"data:$("#submit_id").closest("form").serialize(), dataType:"html"," 
be 
data:$("#add_porperty").closest("form").serialize(), dataType:"html",
 
???

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to