getForm

          Property, read only 
          Member of  ScriptUtils.ASPForm 

Description
Form with the same ID in this ASP application.
Syntax
Set vgetForm = ASPForm.getForm (UploadID as Long)
 
Where Type Optional Default Description
 UploadID  Long     ID of the form. 
Returns
ASPForm - The ASPForm collection retrieves the values of form elements posted to ASP script by a form using the POST method. ASPForm can process multipart/form-data or application/x-www-form-urlencoded data with length up to 2GB.
Returns
- void ASPForm, if upload does not begin yet. - ASPForm in progress during upload - Error when upload is finished
Remarks
Let's you access another uploading form in the same process (ASP application). You can access form fields that are currently uploaded and other ASPForm properties (uploaded size, form state, ...)
Examples
 Upload - upload with ie-style progress bar.  
 Upload - Progress bar concept.  
      Web browrser (IE/NN) does not accept response data when uploading. So there is one another way to show progress bar during upload - open a new client browser window with another server script on begginning of upload and access current uploading form from the second server script (task).
      These two server upload tasks are join using ScriptUtils.ASPForm.UploadID property (in the uploading task) and ScriptUtils.ASPForm.getForm property (progress bar task). You can use ScriptUtils.ASPForm.NewUploadID property to get unique upload ID, or you can get this ID by any other way (for example, using rnd() function).
<%
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
  Dim Form: Set Form = Server.CreateObject("ScriptUtils.ASPForm")
  Form.UploadID = Request.QueryString("UploadID")
  If Form.State = 0 Then
  ....
  End If
End If'POST
%>

Progress bar script:

<%
  Dim Form: Set Form = CreateObject("ScriptUtils.ASPForm")
  On Error Resume Next
  Set Form = Form.getForm(Request.QueryString("UploadID"))
  
  If Err = 0 Then '?Completted 0 = in progress
      For Each Field In Form.Files
        fHTML = fHTML & "FieldName:" & Field.Name
        If Field.Length<=0 And Field.FileName<>"" Then
          fHTML = fHTML & ", uploading: " & Field.FileName
        ElseIf Field.Length>0 Then
          fHTML = fHTML & ", OK: " & Field.FileName & "," & FormatSize(Field.Length)
        End If
        
        fHTML = fHTML & "<br>"
      Next
     Response.Write fHTML
  End If
%>
See also
  Other links for getForm
Methods of ASPForm class
The ASPForm collection retrieves the values of form elements posted to ASP script by a form using the POST method. ASPForm can process multipart/form-data or application/x-www-form-urlencoded data with length up to 2GB.
      Easy to use, hi-performance ASP file upload component with progress bar indicator. Let's you upload multiple files with size up to 2GB to a disk or database along with another form fields. Works with large posts, any character set (including unicode utf-8). Contains one-click multiple files/folders download with on-the-fly compression (Using BinaryWrite/BinaryRead).
      Hi-performance text file logging for ASP/VBScript/VBA applications. Lets you create daily/weekly/monthly log files with variable number of logged values and extra timing and performance info.
       Lets you work with safearray binary data in VBS/JS. It also enables conversion between binary and String data using several code pages. ZLib compress and uncompress functions. Lets you transfer files using compressed stream from a client to server using IE.
      This library also enables calling of some Kernel and Advapi functions (performance, timing, sleep, configuration ...) and enables native work with INI files.


© 1996 – 2005 Motobit Software, help{at}pstruh.cz, help v. 2.16.14