Here's the html page I used to test it out, take a look at the
js function at the top of the page. It just needs a bit of tightening-up to check that the field objects exist before trying to access the value properties.
Code:
<html>
<head>
<SCRIPT LANGUAGE="javascript" type="text/javascript">
<!--
function submitData(frm)
{
if (frm)
{
var sAction = "PostFileAndData.asp?";
sAction += "text1=" + escape(frm.text1.value);
sAction += "&text2=" + escape(frm.text2.value);
frm.action = sAction;
frm.submit();
}
}
//-->
</SCRIPT>
<title>Upload File and data Test</title>
</head>
<body>
<FORM action="PostFileAndData.asp" method=POST id=form1 name=form1 enctype="multipart/form-data">
<INPUT type="file" id="file1" name="file1">
<INPUT type="text" id="text1" name="text1">
<INPUT type="text" id="text2" name="text2">
<INPUT type="button" value="Button" id="button1" name="button1" onclick="submitData(this.form);">
</FORM>
</body>
</html>
hth
Phil