Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Getting a Runtime Error

Please help with the code below, I am receiving a run-time error.

I am getting 4 parameters passed from URL and then I am posting it to a form.
While doing that I am receiving run-time error.

<html>
<head>
<title> Launch Site </title>

<%
Dim strParam1
Dim strParam2
Dim strParam3
Dim strParam4

strParam1 = (Request.QueryString("PARM1"))
Response.Write(strParam1)

strParam2 = (Request.QueryString("PARM2"))
Response.Write(strParam2)

strParam3 = (Request.QueryString("PARM3"))
Response.Write(strParam3)

strParam4 = (Request.QueryString("PARM4"))
Response.Write(strParam4)
%>

<SCRIPT LAUNGUAGE=javascript>

function SubmitForm()
{
document.frmOpenWWEmployee.submit();

}

</SCRIPT>

</head>

<body onload ="javascript:SubmitForm();">

<form name ="frmOpen" method ="post" action="https://new.asp">

<input type ="hidden" name="txtAutoLogon" value="1">
<input type="hidden" name="txtParam1 " value=<%strParam1 %>">
<input type="hidden" name="txtParam2 " value=<%strParam2 %>">
<input type="hidden" name="txtParam3 " value=<%strParam3 %>">
<input type="hidden" name="txtParam4 " value=<%strParam4 %>">

</form>

</body>
</html>
[1484 byte] By [jessy24] at [2007-11-11 6:59:35]
# 1 Re: Getting a Runtime Error
Assuming the code is posted without change, the action attribute of the form tag has an invalid URL.

Also, your form name reference in the document object is wrong.

Other than that, it would help if you could post the error details. If needed, you can trap this using the err object and add the On Error Resume Next declaration.

Good luck,
msanchez at 2007-11-11 17:27:37 >