PHP 应用程序中的选项卡 - 融合图表
Tabs in PHP Application - Fusion Charts
如何显示选项卡内容加载时请稍候或进度轮。
当我单击选项卡"当前状态"时,它将加载" dashboard_sla.php "具有融合图表。当图表正在加载时,我想显示进度轮或请稍候。
请找到我的代码
<?php
if($status == AUTH_LOGGED){
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Dashboard</title>
<style>
#tabs{
padding-right:20px; /* The right most tab will be padded 20px from its right */
margin:0px;
float:right; /* For right aligned tabs */
}
#tabs a{
background:#000 url(images/left_tab.gif) top left no-repeat; /* Background image is positioned top, left */
color:#FFF;
padding-left:5px; /* Change this padding according to the size of image slices used to create tab */
text-decoration:none;
}
#tabs a:hover{
background:#EDCB27 url(images/selected_left_tab.gif) top left no-repeat;
color:#000;
text-decoration:none;
}
#tabs a span{
background:#000 url(images/right_tab.gif) top right no-repeat; /* Note the position of background image */
color:#FFF;
padding-right:15px;
}
#tabs a:hover span{
background:#EDCB27 url(images/selected_right_tab.gif) top right no-repeat;
color:#000;
}
#tabs li{
list-style:none;
float:left;
padding-left:3px;
}
#tabs b{
background:#EDCB27 url(images/selected_left_tab.gif) top left no-repeat;
color:#FFF;
padding-left:5px;
font-weight:normal;
}
#tabs b span{
background:#EDCB27 url(images/selected_right_tab.gif) top right no-repeat;
color:#000;
padding-right:15px;
}
#tabs span{
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
padding:6px;
cursor:pointer;
}
#tabs a,#tabs a span,#tabs b,#tabs b span{
display:block; /* Set display to block, otherwise background images will not work*/
float:left;
}
</style>
</head>
<body>
<?php
$tab=$_REQUEST['tab'];
if($tab=='') $tab='Dashboard1';
?>
<ul id="tabs">
<?php if($tab=='Dashboard1'){ ?>
<li><b><span>Current Status</span></b></li>
<?php }else{ ?>
<li><a href="?tab=Dashboard1"><span>Current Status</span></a></li>
<?php } ?>
<?php if($tab=='Dashboard2'){ ?>
<li><b><span>SLA Trend IT</span></b></li>
<?php }else{ ?>
<li><a href="?tab=Dashboard2"><span>SLA Trend IT</span></a></li>
<?php } ?>
</ul>
<div style="clear:both; background-color:#FFFFFF; height:0px; overflow:hidden"></div>
<div style="border:solid 3px #FFFFFF; background-color:#FFFFFF; padding:10px; font-family:Verdana, Geneva, sans-serif; font-size:11px;">
<?php if($tab=='Dashboard1'){
include('dashboard_sla.php');
} else if($tab=='Dashboard2'){
include('dashboard_sla6.php');
}
}
else{
echo "<center>You must log in First</center>";
echo "</td>";
echo "<td style='padding:0 0 0 28px;' valign=top>";
echo "<iframe frameborder=0 width=100% name=mainf scrolling=auto src=dashboard.php marginwidth=0 marginheight=0 style=margin:0px; padding:0px; height=600></iframe>";
echo "</td></tr></table>";
echo " </div>'n";
echo "</div>'n";
echo "'n";
} ?>
</div>
</body>
</html>
单击选项卡时添加 jquery 进度条。 添加 jquery UI 插件。
<script>
$(function() {
$( "#progressbar" ).progressbar({
});
});
</script>
另一个选项是您可以添加"加载器"。添加加载程序映像。
<div id="loader">
<img src="loader.gif" alt="" />
</div>
之后,当您单击一个选项卡时,编写代码,
$('#loader').show();
相关文章:
- 我的单元测试选项是什么
- 如何更改bigquery API中的计费层选项
- 使用Javascript获取所选选项ID
- Selectize.js:如何对整数值的选项进行排序
- 通过js在新选项卡中有条件地打开url
- 按照选项卡索引的顺序循环一个jQuery选择
- 如何在使用selectBoxIt JQuery插件时检测选项更改
- 无法在Ionic select中预先选择最后一个选项
- 如何在选项卡上定义属性'的主窗口对象
- 为什么grunt contrib connect的中间件选项的第三个参数是未定义的
- 使用此选项选择父类内部的类
- CKeditor:更改对话框中的默认选择选项
- JQuery覆盖不更改单选选项
- 活动选项卡's源代码-获取变量s值
- 绑定时将Parsley minlength消息作为选项传递时,未对其进行自定义
- 如何从选择框中的选项中获取属性值
- 如何在从多选下拉列表中选择选项值时动态生成文本框
- PHP 应用程序中的选项卡 - 融合图表
- 更改融合表图层选项样式选项
- 谷歌标记位置选项:从谷歌融合表中检索纬度和经度