home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 9 / IOPROG_9.ISO / contrib / iis4 / iis4_03.cab / iihdn.asp < prev    next >
Encoding:
Text File  |  1997-08-26  |  1.3 KB  |  65 lines

  1. <%@ LANGUAGE=VBScript %>
  2. <%Option Explicit %>
  3.  
  4. <% 
  5.  
  6.     'On Error Resume Next
  7.     
  8.     Dim numrows, numcols, i, j
  9.  
  10.     
  11.     numrows=Request.QueryString("numrows")
  12.     if numrows = 0 then
  13.         'we need a blank entry...
  14.         numrows = 1
  15.     end if 
  16.         
  17.     if (Request.QueryString("cols") <> "") then 
  18.         numcols=(Request.QueryString("cols").count)
  19.     else
  20.         numcols=0
  21.     end if 
  22.  %>
  23.  
  24. <HTML>
  25. <HEAD>
  26.     <TITLE>Hidden Form</TITLE>
  27. </HEAD>
  28.  
  29. <BODY BGCOLOR="#000000">
  30.  
  31. <FORM NAME="hiddenlistform" ACTION="iiputls.asp" METHOD=POST>
  32.  
  33. <SCRIPT LANGUAGE="JavaScript">
  34.  
  35.     colNames=new Array(<%= numcols %>)
  36.     <% i=1 %>    
  37.     <% do while (i < numcols+1)  %>
  38.         colNames[<%= (i-1) %>]="<%= Request.QueryString("cols")(i) %>"
  39.     <% i=i + 1 %>
  40.     <% loop %>
  41.     
  42.  
  43.  
  44.     <% 'Script to create an array of list controls for list processing. One a Set (cols) of controls will be created For Each list item, as determined by numrows %>
  45.  
  46.         for (var i=1; i < <%= numrows+1 %>; i++) {
  47.             for (var J=0; J < <%= numcols %>; J++) {    
  48.                 <% 'Yields a control named: col1Name1, col2Name2, etc. %>
  49.                 document.write("<INPUT NAME='" + colNames[J] +"' TYPE='text'>");
  50.             }
  51.             document.write("<br>");
  52.         }
  53.     
  54.         parent.main.head.listFunc.SetListVals();
  55.             
  56.         <% 'Now... Submit, and write the list to the SSO! %>
  57.         document.hiddenlistform.submit();
  58.  
  59. </SCRIPT>
  60.  
  61. </FORM>
  62.  
  63. </BODY>
  64. </HTML>
  65.