Forms Test Http Method GET


 

Hidden sessionId

An easy form with two hidden fields sent to the server using the get method.
The first hidden field holds the constant 1
The second hidden field holds a sessionId

Identifying attribute name=form1

 

Select a color.
Select a size.
 

 

Result:

Two hidden fields:

  1. field f1 assigned the constant 1
  2. field session that holds a sessionid

Two select controls:

  1. field color assigned one value of (red white blue turquoise black forestgreen)
    Default is forestgreen.
  2. field size assigned one value of (small medium large xlarge)
    Defualt is xlarge

 

since Build 810 ok


Hidden sessionId and a hidden id string

Like the example above but this form contains a hidden field whose value changes after each submit.

Identifying attribute name=form2

Select a color.
Select a size.

 

Result:

Like the example above and a additional hidden field

  1. field uuid with a random string as value

since Build 810 ok


One hidden field and two listboxes with multiple select enabled

This form doesn't define an action attribute.
Each attribute of the first listbox is assigned an ordinal number using the attribute value. The second listbox doesn't define any value attributes. The strings displayed have to be submitted instead.

The structure of this form:

<form>             <!-- no action attribute defined, no method attribute defined, no identifying attribute set -->
  hidden field
  text field
  <select multiple> <option value=1>Option1 ... </select>       <!-- values specified in the value attribte -->
  <select multiple> <option>Opt1 ... </select>                      <!-- no value attribute specified -->
</form>










Result:

  1. One hidden sessionid, name: session
  2. One textfield, name: text
  3. Listbox that has a value for each item predefined, name: multiselect
  4. A listbox that submits its displayed options, name: multiselect2

Build 810 ok


Checkboxes and radiobuttons
Netscape - IExplorer 4.0 differences

 

Since IExplorer 4.0 the attribute disabled may be set for each control. Effect: The value of disabled controls won't be sent to the server. Netscape simply ignores the disabled attribute.

Identifying attribute name=form3

Result when using IExplorer 4.0

  1. The textfield can't be submitted
  2. The preselected item in the radio group can't be submitted

Result when using Netscape

  1. Everything can be submitted

Forms that should be ignored by the recorder

 

This form will be mailed to Kligor.T@Gee.whiz.com when submitted

<form action="mailto:Kligor.T@Gee.whiz.com" action="post" enctype= ".... >

 




 

 

The following form doesn't cause network traffic anyway.

<form action="javascript:for(i= 0; i < 10; i++) alert(it)>
  <input type="submit">
</form>

 


 

Result:

  1. Form of this type must not be added to the list of forms
  2. The contence must not be skipped because it may contain other embedded docs as well

Build 614 problems

  1. Both forms were added to the list of forms

 


Enctype=multipart/form-data, HTTP Method Get
Netscape and IExplorer handle this problem in a different way

<form action=data2html.asp enctype=multipart/form-data method=get name='malMultipart 1'> ?????
   <input type=file name=fname>
   <input type=hidden name=Pinguin value='sessionid'>
</form>

The attribute enctype specifies the content type when the value of 'method' is 'post'. Default is 'application/x-www-form-urlencoded'. Therefore, 'mulitpart/form-data' should only be used with method 'post' and an input control of type 'file'.
IExplorer and Netscape have different ways to solve this problem in conjunction with the 'get' method.

Identifying attribute name='malMultipart 1'

 

Result:

  1. Netscape ignores the 'get' method. Instead it uses method 'post' to send the file and all other controls using enctype 'mulitpart/form-data' for each.
  2. IExplorer ignores the enctype and uses the 'get' method to submit. The control of type 'file' will be treated like a control of type 'text'. The file itself won't be uploaded.
    The submitted query string looks something like: http://data2html.asp?fname= Absolute Path of the file&Pinguin=34556

Build 614:

  1. Recorded with WebPageSubmitBin("malMulitpart 1", " ---   ")   --> makes browser specific settings in the replay redundant

Enctype=multipart/form-data, HTTP Method Get
Netscape and IExplorer handle this problem in a different way

 

Same as above but no control defined where enctype 'multipart/form-data' would be useful.
Result: Same as above. Netscapes sends all controls using enctype 'multipart/form-data'. IExplorer ignores the enctype uses method 'get' instead.

 

<form action=data2html.asp enctype=mulitpart/form-data method=get name='malMulitpart 2'>
   <input name=someText value=ACTIVE_OPEN>
   <input type=submit value=Commit>
</form>

Identifying attribute name='malMultipart 2'

 

 

Result:

  1. Netscape always uses method post when it detects the enctype 'mulitpart/form-data'
  2. IExplorer prefers the method specified by the method attribute

Wrong attribute enctype with input type 'file'

 

What happens if we have an input control of type 'file' and a false enctype?
Result: Netscape and IExplorer behave the same. Default enctype 'application/x-www-form-urlencoded' will be used with methods 'post' or 'get'.

 

The following two forms looks like:
<form action=data2html.asp enctype=multipart/kaputt-data method=get/post>

Identifying attribute name='malMultipart 3'

 


Identifying attribute name='malMultipart 4'



Forms with invalid method

 

Identifying attribute name=ConfusedForm1
Default enctype
Wrong http method

 

The form looks like:
<form action=data2html.asp method=submit>
   &lg;input type=file name=fname>
   etc...
</form>

 


 

Results:

  1. The wrong http method has to be substituted with method 'get'
  2. As enctype is default 'application/x-www.form-urlencoded' Netscape and IExplorer will submit the form using method 'get'.

Forms with invalid method

 

Identifying attribute name=ConfusedForm2
Mulitpart/form-data enctype
Wrong http method

 

The form looks like:
<form action=data2html.asp enctype=multipart/form-data method=submit>
   &lg;input type=file name=fname>
   etc...
</form>

 


 

Results:

  1. The wrong http method has to be substituted with method 'get'
  2. As enctype 'mulitpart/form-data' Netscape will post the form using enctype 'mulitpart/form-data'. IExplorer will use enctype 'application/x-www-urlenced' and method 'get'.

Parameters in query string and in the form block

 

Identifying attribute name=MixedParams
Value pairs attached to action string: id='random' tengo='random'
Value pairs in the form: cfm='random' quick='random'
No enctype and no method defined. Use default.

 

The form looks like:
<form action=data2html.asp?id='rndvalue'&tengo='rndValue'>
   <input name=cfml value='rndvalue'>
   etc...
</form>

 

 

Result:

  1. Value pairs 'id' and 'tengo' will be lost

Build 614 problems

  1. Catastrophic replay.