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

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