|
|
|
รบกวนขอความช่วยเหลือเรื่อง progress bar |
|
|
|
|
|
|
|
ตอนนี้ใช้โค้ดนี้อยู่ค่ะ หากมีโค้ดอื่นที่ดีกว่ารบกวนแนะนำด้วยค่ะ (ขอบคุณล่วงหน้าค่ะ)
Code (ASP)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title></title><meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="style_rit.css" rel="stylesheet" type="text/css" />
<link href="css/sunny/jquery-ui-1.10.3.custom.css" rel="stylesheet" type="text/css" />
<script src="js/jquery-1.9.1.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.10.3.custom.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("#tabs").tabs({
beforeLoad: function (event, ui) {
ui.jqXHR.error(function () {
ui.panel.html(
"Couldn't load this tab. We'll try to fix this as soon as possible. " +
"If this wouldn't be a demo.");
});
}
});
});
$(document).ready(function() {
$("#tabs").tabs({active: document.form.currentTab.value});
$('#tabs a').click(function(e) {
var curTab = $('.ui-tabs-active');
curTabIndex = curTab.index();
document.form.currentTab.value = curTabIndex;
});
});
</script>
<script language="javascript">
<!--
function replace_html(id, content) {
document.getElementById(id).innerHTML = content;
}
function show_progressbar(id) {
replace_html(id, '<img src="http://images.code-head.com/progress-bars/4.gif" border="0" alt="Loading, please wait..." />');
}
function changeflg(id)
{
show_progressbar('content');
form.action = "test5.asp?currentTab="+id;
form.submit();
}
var progress_bar = new Image();
progress_bar.src = 'http://images.code-head.com/progress-bars/4.gif';
//-->
</script>
</head>
<body leftmargin="0" topmargin="0" >
<form name="form" method="post">
<input type="hidden" name="actype">
<input type="hidden" name="currentTab" value="0"/>
<div id="tabs">
<ul>
<li><a href="#tabs-1">A</a></li>
<li><a href="#tabs-2">B</a></li>
<li><a href="#tabs-3">Attach File</a></li>
</ul>
<div id="tabs-1">
<table border="0" cellspacing="1" cellpadding="1" align="center" width="95%" bgcolor="#FEDBC0">
<tr>
<td><a href="javascript:changeflg();">Send Request</a> </td>
</tr>
<tr>
<td colspan="5" align="center">
<!-- แสดง progressbar -->
<div id="content">
</div>
</td>
</tr>
</TABLE>
</div>
<div id="tabs-2"></div>
<div id="tabs-3"></div>
</div>
</form>
</body>
</html>
|
|
|
|
|
Date :
2014-03-21 16:38:58 |
By :
oyoyho |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|