Viewing file: getinfo.js (7.97 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
var xmlHttp
function ShowInfo(DrsIDshow){
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null){
alert ("Browser does not support HTTP Request")
return
}
var url="getinfo.php";
url=url+"?DrsIDshow="+DrsIDshow+"&q=getinfo"+GetInfoString();
//alert(url);
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function ShowInfo2(DtPsID,DrsIDshow){
var agree=confirm("คุณต้องการลบรายชื่อที่จะส่งด่วนแน่นอนใช่หรือไม่ ?");
if (agree){
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null){
alert ("Browser does not support HTTP Request")
return
}
var url="getinfo.php";
url=url+"?DrsIDshow="+DrsIDshow+"&DtPsID="+DtPsID+"&del=1";
xmlHttp.onreadystatechange=stateChanged1
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}else{
return false ;
}
}
function ShowInfoReceive(DLCID,MaxDocGroup,DlcPS2){
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null){
alert ("Browser does not support HTTP Request")
return
}
s=document.getElementById("s").value;
searchName=document.getElementById("searchName").value;
searchNo=document.getElementById("searchNo").value;
monthe=document.getElementById("monthe").value;
searchYear=document.getElementById("searchYear").value;
searchTypeNoF=document.getElementById("searchTypeNoF").value;
searchTypeNoT=document.getElementById("searchTypeNoT").value;
if (searchYear=="") {
alert('กรุณากรอกปี');
document.getElementById("searchYear").focus();
return false ;
}
var url="showSelectDoc.php";
url=url+"?s="+s+"&DLCID="+DLCID+"&MaxDocGroup="+MaxDocGroup+"&DlcPS2="+DlcPS2+"&searchName="+searchName+"&searchNo="+searchNo+"&monthe="+monthe+"&searchYear="+searchYear+"&searchTypeNoF="+searchTypeNoF+"&searchTypeNoT="+searchTypeNoT;
//alert(url);
xmlHttp.onreadystatechange=stateChanged2
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function ShowInfoSendDoc(DLCID,MaxDocGroup,DlcPS2){
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null){
alert ("Browser does not support HTTP Request")
return
}
searchName=document.getElementById("searchName").value;
searchNo=document.getElementById("searchNo").value;
monthe=document.getElementById("monthe").value;
searchYear=document.getElementById("searchYear").value;
if (searchYear=="") {
alert('กรุณากรอกปี');
document.getElementById("searchYear").focus();
return false ;
}
var url="showSelectSendDoc.php";
url=url+"?DLCID="+DLCID+"&MaxDocGroup="+MaxDocGroup+"&DlcPS2="+DlcPS2+"&searchName="+searchName+"&searchNo="+searchNo+"&monthe="+monthe+"&searchYear="+searchYear;
//alert(url);
xmlHttp.onreadystatechange=stateChanged2
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function ShowInfoSign(DLCID,MaxDocGroup,DlcPS2){
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null){
alert ("Browser does not support HTTP Request")
return
}
s=document.getElementById("s").value;
searchName=document.getElementById("searchName").value;
searchNo=document.getElementById("searchNo").value;
monthe=document.getElementById("monthe").value;
searchYear=document.getElementById("searchYear").value;
if (searchYear=="") {
alert('กรุณากรอกปี');
document.getElementById("searchYear").focus();
return false ;
}
var url="showSelectSignDoc.php";
url=url+"?s="+s+"&DLCID="+DLCID+"&MaxDocGroup="+MaxDocGroup+"&DlcPS2="+DlcPS2+"&searchName="+searchName+"&searchNo="+searchNo+"&monthe="+monthe+"&searchYear="+searchYear;
//alert(url);
xmlHttp.onreadystatechange=stateChanged2
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function ShowInfoRegis(DLCID,MaxDocGroup,DlcPS2,RsID,DtID){
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null){
alert ("Browser does not support HTTP Request")
return
}
searchName=document.getElementById("searchName").value;
searchNo=document.getElementById("searchNo").value;
monthe=document.getElementById("monthe").value;
searchYear=document.getElementById("searchYear").value;
alert(searchYear);
/*
if (searchYear=="") {
alert('กรุณากรอกปี');
document.getElementById("searchYear").focus();
return false ;
}
var url="showSelectRegisDoc.php";
url=url+"?DLCID="+DLCID+"&MaxDocGroup="+MaxDocGroup+"&DlcPS2="+DlcPS2+"&RsID="+RsID+"&DtID="+DtID+"&searchName="+searchName+"&searchNo="+searchNo+"&monthe="+monthe+"&searchYear="+searchYear;
alert(url);
xmlHttp.onreadystatechange=stateChanged2
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
*/
}
function ShowInfoSendDocforSign(DLCID,MaxDocGroup,DlcPS2){
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null){
alert ("Browser does not support HTTP Request")
return
}
searchName=document.getElementById("searchName").value;
searchNo=document.getElementById("searchNo").value;
monthe=document.getElementById("monthe").value;
searchYear=document.getElementById("searchYear").value;
if (searchYear=="") {
alert('กรุณากรอกปี');
document.getElementById("searchYear").focus();
return false ;
}
var url="showSelectSendDocforSign.php";
url=url+"?DLCID="+DLCID+"&MaxDocGroup="+MaxDocGroup+"&DlcPS2="+DlcPS2+"&searchName="+searchName+"&searchNo="+searchNo+"&monthe="+monthe+"&searchYear="+searchYear;
//alert(url);
xmlHttp.onreadystatechange=stateChanged2
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function ShowInfostatusSendDocforSign(DLCID,MaxDocGroup,DlcPS2){
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null){
alert ("Browser does not support HTTP Request")
return
}
searchName=document.getElementById("searchName").value;
searchNo=document.getElementById("searchNo").value;
monthe=document.getElementById("monthe").value;
searchYear=document.getElementById("searchYear").value;
if (searchYear=="") {
alert('กรุณากรอกปี');
document.getElementById("searchYear").focus();
return false ;
}
var url="showSelectstatusSendDocforSign.php";
url=url+"?DLCID="+DLCID+"&MaxDocGroup="+MaxDocGroup+"&DlcPS2="+DlcPS2+"&searchName="+searchName+"&searchNo="+searchNo+"&monthe="+monthe+"&searchYear="+searchYear;
//alert(url);
xmlHttp.onreadystatechange=stateChanged2
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function GetInfoString(){
var iCount =0;
var sData="";
iCount=document.ff.elements.namedItem("sendToPs[]","").length;
if(iCount>>0){
for(i=0;i<iCount;i++){
if (document.ff.elements.namedItem("sendToPs[]","")(i).checked){
sData += "&sendToPs[]=" + document.ff.elements.namedItem("sendToPs[]","")(i).value;
}
}
}
return sData;
}
function stateChanged(){
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
document.getElementById("show_info").innerHTML=xmlHttp.responseText
}
}
function stateChanged1(){
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
document.getElementById("show_info").innerHTML=xmlHttp.responseText
}
}
function stateChanged2(){
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
document.getElementById("showselect").innerHTML=xmlHttp.responseText
}
}
function GetXmlHttpObject(){
var xmlHttp=null;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}
function ShowPendingImage(){
document.getElementById("show_info").innerHTML="<image src=bigrotation2.gif>Please Wait!</image>";
}
function HidePendingImage(){
document.getElementById("show_info").innerHTML="";
}
|