var xmlHttp; // XMLHttpRequest对象
// 创建XMLHttpRequest对象
function createXMLHttpRequest(){
if(window.activeXObject){
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else if(window.XMLHttpRequest){
xmlHttp = new XMLHttpRequest();
}
}
// 使 txtBarcode 得到焦点
function SetFocus()
{
form1.txtBarcode.focus();
}
function save(){
if(window.event.keyCode == 13){
var stock_box_id = '<%= Request.QueryString["stock_box_Id"] %>';
var barcode = form1.txtBarcode.value;
var url = "stock_scan.ashx?stock_box_id=" + stock_box_id + "&barcode=" + barcode;
createXMLHttpRequest();
xmlHttp.open("GET", url, true);
xmlHttp.onreadystatechange = finishCall;
xmlHttp.send(null);
}
}
function finishCall(){
if(xmlHttp.readyState == 4){
if(xmlHttp.status == 200){
if(xmlHttp.responseText == ""){
document.getElementById("<%= lbl_msg.ClientID %>").innerText = "";
document.getElementById("<%= lbl_msg.ClientID %>").style.visibility = "hidden";
var box_number = document.getElementById('<%= fv_jsp.FindControl("lbl_Box_Number").ClientID %>').innerHTML;
var lbl;
if( box_number.substr(box_number.length - 1) == "A")
lbl = document.getElementById('<%= fv_jsp.FindControl("lbl_A").ClientID %>');
else
lbl = document.getElementById('<%= fv_jsp.FindControl("lbl_B").ClientID %>');
lbl.innerHTML = Number(lbl.innerHTML) + 1;
}
else{
document.getElementById("<%= lbl_msg.ClientID %>").innerText = xmlHttp.responseText;
document.getElementById("<%= lbl_msg.ClientID %>").style.visibility = "visible";
}
}
}
}
// 创建XMLHttpRequest对象
function createXMLHttpRequest(){
if(window.activeXObject){
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else if(window.XMLHttpRequest){
xmlHttp = new XMLHttpRequest();
}
}
// 使 txtBarcode 得到焦点
function SetFocus()
{
form1.txtBarcode.focus();
}
function save(){
if(window.event.keyCode == 13){
var stock_box_id = '<%= Request.QueryString["stock_box_Id"] %>';
var barcode = form1.txtBarcode.value;
var url = "stock_scan.ashx?stock_box_id=" + stock_box_id + "&barcode=" + barcode;
createXMLHttpRequest();
xmlHttp.open("GET", url, true);
xmlHttp.onreadystatechange = finishCall;
xmlHttp.send(null);
}
}
function finishCall(){
if(xmlHttp.readyState == 4){
if(xmlHttp.status == 200){
if(xmlHttp.responseText == ""){
document.getElementById("<%= lbl_msg.ClientID %>").innerText = "";
document.getElementById("<%= lbl_msg.ClientID %>").style.visibility = "hidden";
var box_number = document.getElementById('<%= fv_jsp.FindControl("lbl_Box_Number").ClientID %>').innerHTML;
var lbl;
if( box_number.substr(box_number.length - 1) == "A")
lbl = document.getElementById('<%= fv_jsp.FindControl("lbl_A").ClientID %>');
else
lbl = document.getElementById('<%= fv_jsp.FindControl("lbl_B").ClientID %>');
lbl.innerHTML = Number(lbl.innerHTML) + 1;
}
else{
document.getElementById("<%= lbl_msg.ClientID %>").innerText = xmlHttp.responseText;
document.getElementById("<%= lbl_msg.ClientID %>").style.visibility = "visible";
}
}
}
}
解决方案 »
- 在线等。。。各位大虾帮帮忙,如何取得当前选中的girdview的行数
- 50分求助vs2005(vb.net)中使用MSFLEXGRID的问题
- ValidationSummary控件怎么跟其它控件相联系
- 放了一个linkbutton控件,为什么会弹出这样的错误?
- gridview
- Datagrid 的问题
- 根据客户端IP 就获得他所在城市的名称以及天气 100分求助
- ASP.NET百度无人能解决的错误
- 怎么样给所有网页添加同一个元素
- sql server 2000是windows身份验证 连接字符串,怎么写呀?
- ExecuteScalar 指定的转换无效。急急急!
- 尝试对参数 http://tempuri.org/ 进行序列化时出错
还有updatepanel无刷新