Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Jquery Append

$
0
0
I want call an php funtion and return a value.

This value has to be appended to a div. I try a lot of things but nothing works. This is more far that i get:

echo CHtml::ajaxSubmitButton('add one more',
    CController::createUrl('cadTabelapreco/UpdateFilho'),
array('type'=>'POST',
      'data'=>array('item'=>'CadTabelaprecoi',
                    'i'=>$i,            
      'complete' => 'function(){
            $("#data").append($(this).html()); 
      }',         
));


I also try this:

array('type'=>'POST',
      'data'=>array('item'=>'CadTabelaprecoi',
                    'i'=>$i,
                    'form'=>$form),            
      'complete' => 'function(ret){
            $("#data").append().val(ret); 
      }',         
));


The thing is, if i debug it with firebug, i see the response and its right, but i cant append the value to the div. Anyone know how to do that?

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>