home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_03.cab / iipoptl.asp < prev    next >
Text File  |  1997-11-12  |  4KB  |  151 lines

  1. <%@ LANGUAGE=VBScript %>
  2. <% Option Explicit %>
  3. <% Response.Expires = 0 %>
  4.  
  5. <% 
  6. Const L_OK_TEXT="OK"
  7. Const L_HELP_TEXT="Help"
  8. Const L_CANCEL_TEXT="Cancel"
  9. Const L_SAVING_TEXT="Saving"
  10. Const L_NOHELP_ERRORMESSAGE = "The help file is unavailable."
  11. %>
  12.  
  13. <HTML>
  14. <SCRIPT LANGUAGE="JavaScript">
  15.  
  16.     
  17.     function toolFuncs(){
  18.         this.mainframe = top.opener.top;
  19.     }
  20.     
  21.     toolFunc = new toolFuncs();
  22.     
  23.     
  24.     function closeWin(){
  25.         top.location.href="iipopcl.asp"
  26.     }
  27.     
  28.     function ok(){
  29.         writingList=false;
  30.         mf = toolFunc.mainframe;        
  31.         if (parent.main.head !=null){
  32.             uform=parent.main.head.document.userform;
  33.             writingList=true;
  34.             parent.main.head.listFunc.writeList();
  35.         }
  36.         else{
  37.             uform=parent.main.document.userform;
  38.         }
  39.         
  40.         //mf.body.iisstatus.location.href="iistat.asp?thisState=<%= L_SAVING_TEXT %>";                
  41.         
  42.         path="?page=popup";        
  43.         for (i=0; i < uform.elements.length;i++){
  44.             thiselement=uform.elements[i];
  45.             thisname=uform.elements[i].name;
  46.             thisval=uform.elements[i].value;
  47.             thisname.toLowerCase();
  48.  
  49.             if (thisname !=""){
  50.                 if (thisname.substring(0,3)!="chk"){
  51.                     if (thisname.substring(0,3)!="txt"){                                                        
  52.                         if (thisname.substring(0,3)!="rdo"){
  53.                             if (thisname.substring(0,3)!="hdn"){
  54.                                 if (thisname.substring(0,3)!="btn"){        
  55.                                     path=path + "&" + escape(thisname);
  56.                                     path=path + "=" + escape(thisval);
  57.                                 }
  58.                             }
  59.                         }
  60.                     }
  61.                     else{
  62.                         path=path + "&" + thisname.substring(3, thisname.length);
  63.                         path=path + "=" + escape(thisval);
  64.                     }
  65.                 }
  66.                 else{
  67.                     path=path + "&" + thisname.substring(3, thisname.length);
  68.                     if (thiselement.checked){
  69.                         path=path + "="+true;
  70.                     }
  71.                     else{
  72.                         path=path + "="+false;                
  73.                     }            
  74.                 }
  75.             }
  76.             else{
  77.                 //hack to compinsate for bug in which text fields get submitted w/o a name...
  78.                 path=path + "&AspScriptErrorMessage=" + thisval
  79.             }
  80.         }
  81.             
  82.             mf.connect.location.href=("iiput.asp"+path);
  83.             if (!writingList){
  84.                 top.location.href="iipopcl.asp"
  85.             }
  86.     }
  87.  
  88.  
  89.     function helpBox(){
  90.         if (top.title.Global.helpFileName==null){
  91.             alert("<%= L_NOHELP_ERRORMESSAGE %>");
  92.         }
  93.         else{
  94.             thefile=top.title.Global.helpDir + top.title.Global.helpFileName+".htm";
  95.             window.open(thefile ,"Help","toolbar=no,scrollbars=yes,directories=no,menubar=no,width=300,height=425");
  96.         }
  97.     }
  98.  
  99.  
  100.  
  101. </SCRIPT>
  102. <BODY BGCOLOR="#CCCCCC" LINK="#FFFFFF" VLINK="#FFFFFF" ALINK="#FFFFFF" LEFTMARGIN=0 TOPMARGIN=0>
  103.  
  104.  
  105. <TABLE WIDTH="100%" BORDER=0 BGCOLOR="#000000" CELLPADDING=5 CELLSPACING=1>
  106. <TR>
  107.  
  108.     <TD ALIGN="right">
  109.  
  110. <TABLE CELLPADDING=5 CELLSPACING=0>
  111.         <TR>        
  112.             <TD VALIGN="top">
  113.                 <FONT SIZE=2 FACE="Verdana,Arial">
  114.                 <B><A HREF="javascript:ok();">
  115.                 <IMG SRC="images/ok.gif" BORDER=0 ALIGN="top" HEIGHT=16 WIDTH=16 ALT="<%= L_OK_TEXT %>"></A>
  116.                 <A HREF="javascript:ok();"><%= L_OK_TEXT %></A></B>
  117.                 </FONT>
  118.             </TD>    
  119.             
  120.             <TD VALIGN="top">    
  121.                 <FONT SIZE=2 FACE="Verdana,Arial" COLOR="#FFFFFF">|</FONT>
  122.             </TD>
  123.  
  124.             <TD VALIGN="top">
  125.                 <FONT SIZE=2 FACE="Verdana,Arial">
  126.                 <B><A HREF="javascript:parent.window.close();">
  127.                 <IMG SRC="images/cncl.gif" BORDER=0 ALIGN="top" HEIGHT=16 WIDTH=16 ALT="<%= L_CANCEL_TEXT %>"></A>
  128.                 <A HREF="javascript:closeWin();"><%= L_CANCEL_TEXT %></A></B>
  129.                 </FONT>
  130.             </TD>    
  131.     
  132.             <TD VALIGN="top">    
  133.                 <FONT SIZE=2 FACE="Verdana,Arial" COLOR="#FFFFFF">|</FONT>
  134.             </TD>
  135.  
  136.             <TD VALIGN="top">
  137.                 <FONT SIZE=2 FACE="Verdana,Arial">
  138.                 <A HREF="javascript:helpBox();">
  139.                 <IMG SRC="images/help.gif" BORDER=0 ALIGN="top" HEIGHT=16 WIDTH=16 ALT="<%= L_HELP_TEXT %>"></A>
  140.                 <B><A HREF="javascript:helpBox();"><%= L_HELP_TEXT %></A></B>
  141.                 </FONT>
  142.             </TD>    
  143.  
  144.         </TR>
  145.         </TABLE>
  146. </TD>
  147. </TR>
  148. </TABLE>
  149.  
  150. </BODY>
  151. </HTML>