warning

来源:互联网 发布:ecap摄像头软件下载 编辑:程序博客网 时间:2024/05/29 18:49


<html>
<body>
<div id="document"><input type=hidden name=hiddenTempDate>
<table cellpadding="0" cellspacing="0" border="0"  width="100%">
    
<script language="javascript">
 function show(){
  disabledAllSelect(); 
  document.all.errDIV.style.display="block";
  document.all.errDIV.style.width=document.body.clientWidth;
  document.all.errDIV.style.height=document.body.clientHeight;
  //document.all.Layer2.style.left = document.all.Layer2.getBoundingClientRect().left;
  //document.all.Layer2.style.top = document.all.Layer2.getBoundingClientRect().top;
  document.all.Layer2.style.display='block';
 }

 function disabledAllSelect(){
  var oSelects = document.getElementsByTagName('select');
  for(var i =0; i<oSelects.length; i++){  
   oSelects(i).disabled = true;
   oSelects(i).style.backgroundColor = '#aaaaaa';
  }
 }
 
 function enableAllSelects(docObj){
  var slts = docObj.getElementsByTagName('select');
  for(var i =0; i<slts.length; i++){
   slts[i].style.backgroundColor="";
   slts[i].disabled = false;
  }
 }

           
 function savereq(flag){

  var msgArr = new Array();
  var isValid = true;
  var errMsg = document.all.errMessage;
  document.all.errMessage.innerHTML = "";
  
  if(document.all.txtPurTrip.value==""){
   msgArr.push("Please Input txtPurTrip");
  }

  if(msgArr.length>0){
   for(var i = 0; i<msgArr.length; i++){
    errMsg.innerHTML +=i+1+". "
    errMsg.innerHTML += msgArr[i];
    errMsg.innerHTML +="<br>"
   }
   show();
   return;
  }
 }
</script>
    

  <form name=form1 action= method=post >
  <table>
   <tr height="20" bgcolor="#f5f5f5"> 
    
    <td style="width:270px;">Purpose of Trip<font color="red">*</font></td>
   </tr>
   <tr height="20" bgcolor="#f5f5f5"> 
    <td><input id=txtPurTrip name=PurTrip class=txtField value=""></td>
   </tr>  
    
  </table>

  <table width=800>
   <tr>
    <td align=center>
     <input onclick="savereq(0);" type=button value=Save class=button id=btnSave name=Save>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
   
    </td>
   </tr>
  </table>
  </form>
    
 <!-- ## Start affect code Start  ## -->
 <div id="errDIV" style="position:absolute;top:0px;FILTER: alpha(opacity=60);background-color:#777; z-index:2; left: 0px;display:none;"></div>
 <div id="Layer2" align="center" style="position:absolute; z-index:11;width:540px;
      left:expression((this.offsetParent.clientWidth/2)-(this.clientWidth/2)+this.offsetParent.scrollLeft);
      top:expression((this.offsetParent.clientHeight/2)-(this.clientHeight/2)+this.offsetParent.scrollTop);
      background-color:#fff;display:none;"
      valign="center">
    <table width=100%;border=1 cellpadding=0 cellspacing=0 style="border:1px solid #e7e3e7;border-collapse: collapse;">
    <tr>
   <td style="background-color:#73A2d6;color:#fff;padding-left:4px;padding-top:2px;font-weight:bold;font-size:14px;" height=15 valign="center">- WARNING -</td>
    </tr>
    <tr>
   <td>Sorry,Cannot submit this request, please check out:</td>
    </tr>
    <tr>
   <td>
    <table width=80% align=center>
     <tr>
      <td align="left" id="errMessage"></td>
     </tr>
    </table>
   </td>
    </tr>
    <tr>
   <td style="background-color:#f7f7f7;" height=15 align="center">
       <input class=button TYPE="button" value="confirm" onclick="document.all.errDIV.style.display='none';document.all.Layer2.style.display='none';enableAllSelects(document);" id=button7 name=button7></td>
    </tr>
    </table>

 </div>


</body>
</html>
 

原创粉丝点击