Error Issue Using Form With Enctype="multipart/form-data"

OE 10.1C
IIS 6.0
Tested on IE11 and FF 41.0.1

I have the follow webspeed program, called upload2.html:
-start code-------
HTML:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Hi</title>
</head>
<body>
<!--WSS
DEF VAR thename AS CHAR NO-UNDO.
thename = GET-VALUE("thename").
{&OUT} "FIRSTHIDDEN:" GET-VALUE("firsthidden") "<br>"
  "NAME:" thename "<br>"
  "SUBMITBUTTON:" GET-VALUE("submitbutton") "<br>"
  "SECONDHIDDEN:" GET-VALUE("secondhidden") "<br>".
-->
<form name="myform" enctype="multipart/form-data" action="upload2.html" method="post">
  <input type="hidden" name="firsthidden" value="yes">
  Name:<input type="text" name="thename" value="`thename`"><br>
  File:<input type="file" name="filename"><br>
  <input type="submit" name="submitbutton" value="LoadFile"><br>
  <input type="hidden" name="secondhidden" value="yes"><br>
</form>
</body>
</html>

-end code-------

I enter Marco to thename input, click on submit button without select
a file, I get this:
FIRSTHIDDEN:yes
NAME:Marco
SUBMITBUTTON:
SECONDHIDDEN:

It does not matter how many times I click on submit button, if I don't
select a file, the program don't get value for "submitbutton" and
"secondhidden".

If I select a file, and click on submit button, the result is as I expected:
FIRSTHIDDEN:yes
NAME:Marco
SUBMITBUTTON:LoadFile
SECONDHIDDEN:yes


WHY? It's a bug, configuration or some kind of expected behavior? Can I fix it?

If I move the "input type file" after the secondhidden input, then it
get the correct values even if I don't select a file.

Thanks in advance for your input,
Marco
 
Top