gpt4 book ai didi

jquery - Yii ajaxLink jquery 在 View 上不起作用

转载 作者:行者123 更新时间:2023-12-01 04:53:51 25 4
gpt4 key购买 nike

在我的页面上,我有一个包含三个页面的选项卡 View 。为此,我使用 CHtml::ajaxLink 如下

<li >
<?php echo CHtml::ajaxLink("Manual Billing", CController::createUrl('billing/manualbilling'), array('update' => 'html',
'type' => 'POST',));?>
</li>
<li>
<?php echo CHtml::ajaxLink("Billing History", CController::createUrl('billing/historyBilling'), array('update' => 'html',
'type' => 'POST',

));?>
</li>
<li>
<?php echo CHtml::ajaxLink("Merchant Wise Billing Status", CController::createUrl('billing/manualbilling'), array('update' => 'html',
'type' => 'POST'), array(//htmlOptions
// 'class' => "reportlink"
));?>
</li>

按照给定的 url,页面正在加载,但问题是我在 View 页面中给出了一些用于实现数据表的 jQuery 函数,但该函数不起作用。

$(document).ready(function() {
$('#example').dataTable( {
"sScrollY": "400px",
"bPaginate": false,
"oLanguage": {

"sEmptyTable": "No records to display"
},

"sDom": 'T<"clear">lfrtip',
"aaSorting": [],
"aoColumns": [
{ "bSortable": false },
null,
null,
null,
null,
null,
],
"oTableTools": {
"sSwfPath": "<?php echo Yii::app()->request->baseUrl; ?>/media/js/TableTools/media/swf/copy_csv_xls_pdf.swf",
"aButtons": [
{
"sExtends": "print",
"sInfo": "Please press escape when print is completed."
}

// {
// "sExtends": "collection",
// // "sButtonText": "Save",
// "aButtons": [ "csv", "xls", "pdf" ]
// }
]
}

} );

} );

它甚至没有进入 document.ready()。请帮忙

最佳答案

感谢@Kevin Higgins 使用 CJuiTabs 小部件解决了问题

$tabs = array(); 

$tabs['Manual Billing'] = array(
'id'=>'dataFieldsTab',
'class'=>'bill',
'content'=>$this->renderPartial('manualbilling',$paramsm,true),
);

$tabs['Billing History'] = array(
'id'=>'linkedChildrenTab1',
'class'=>'bill',

'content'=>$this->renderPartial('historyBilling',$paramsh,true),
);


$this->widget('zii.widgets.jui.CJuiTabs', array(
'tabs' => $tabs,
'options' => array(
'collapsible' => false,
'active' => 0,
),
));

感谢大家的帮助

关于jquery - Yii ajaxLink jquery 在 View 上不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16476078/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com