Javascript yii ajaxLink成功并替换为
三个小时以来,我没有在jquery中找到错误。 创建文件后,我尝试刷新div 以下是我的观点Javascript yii ajaxLink成功并替换为,javascript,php,jquery,yii,Javascript,Php,Jquery,Yii,三个小时以来,我没有在jquery中找到错误。 创建文件后,我尝试刷新div 以下是我的观点 <?php echo CHtml::ajaxLink('Neuen Export erstellen', Yii::app()->createUrl('exporter/create' ), array( 'data' => array(), 'dataType' => 'json', 'type' =&
<?php
echo CHtml::ajaxLink('Neuen Export erstellen',
Yii::app()->createUrl('exporter/create' ),
array(
'data' => array(),
'dataType' => 'json',
'type' => 'POST',
'complete' => "js:function(html){
$('#export-grid').fadeOut().fadeIn();
}",
'success' => "js:function(html){
$('#export-grid').replaceWith();
}"
),
array(
'class' => 'c2a_gray alignright',
'style' => 'font-size: 12px',
)
);
?>
complete选项在ajaxLink功能中运行良好
但是如果我把警报(html)放在完成里面,我会得到“Object Object”
我不知道如何用新内容更新导出网格
请帮帮我!
谢谢 是,如果您尝试提醒html,它将返回Object。
请尝试警报(html.responseText)perfekt!非常感谢你!
public function actionCreate()
{
// createfile();...
// do some stuff
$this->renderPartial('//users//exporter//_tmo', true, true);
}