I need assistance. I have the following code that is used in my wizard type app. To maintain variables across all pages and if the user even goes back from page 20 to page 2 even. All variables are kept with the appropriate field arrays. I seem to have a problem with the LoadVariables function. I have tried many variations with no success. I have done this before in an old dead application and cannot remember what I did but this is still used today. So it's all still compatible with current version of ASP and IIS5.0.
I get a page cannot be displayed with this error.
Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/myforms/Forms/New_Hire_ReAuthorization/include.asp, line 47
===Start of CODE
===Start of Form_P1.asp=============
<%
'Code here
loadHiddenFields 2
loadHiddenFields 3
loadHiddenFields 4
loadHiddenFields 5
loadHiddenFields 6
loadHiddenFields 7
loadVariables 1
loadVariables 2
loadVariables 3
loadVariables 4
loadVariables 5
loadVariables 6
loadVariables 7
'More Code here
%>
===End of Form_P1.asp=============
===Start of Form_P2.asp=============
<%
'Code here
loadHiddenFields 1
loadHiddenFields 3
loadHiddenFields 4
loadHiddenFields 5
loadHiddenFields 6
loadHiddenFields 7
loadVariables 1
loadVariables 2
loadVariables 3
loadVariables 4
loadVariables 5
loadVariables 6
loadVariables 7
'More Code here
%>
===End of Form_P2.asp=============
===Start of Include.ASP=============
aryPage1Fields = Array("lastname", "firstname", "position1", "position2"
aryPage2Fields = Array("middleinit", "maidenname", "appdate", "address", "city", "state", "zip"
Sub loadHiddenFields(pageNumber)
Execute("thisArray = aryPage" & pageNumber & "Fields"
For i = 0 To Ubound(thisArray)
Execute("thisValue = Request.Form(""" & thisArray(i) & """"
Response.Write "<INPUT type=""hidden"" name=""" & thisArray(i) & """ value=""" & thisValue & """>" & vbCrLf
Next
End Sub
Sub loadVariables(pageNumber)
Execute("thisArray = aryPage" & pageNumber & "Fields"
For i = 0 To UBound(thisArray)
Line 47>>> Execute(thisArray(i) & " = Request.Form(""" & thisArray(i) & """"
Next
End Sub
===End of Include.ASP=============
===End of CODE
Any assistance is greatly appreciated. Thanks... Thanks
-Robert
System Analyst/Programmer
I get a page cannot be displayed with this error.
Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/myforms/Forms/New_Hire_ReAuthorization/include.asp, line 47
===Start of CODE
===Start of Form_P1.asp=============
<%
'Code here
loadHiddenFields 2
loadHiddenFields 3
loadHiddenFields 4
loadHiddenFields 5
loadHiddenFields 6
loadHiddenFields 7
loadVariables 1
loadVariables 2
loadVariables 3
loadVariables 4
loadVariables 5
loadVariables 6
loadVariables 7
'More Code here
%>
===End of Form_P1.asp=============
===Start of Form_P2.asp=============
<%
'Code here
loadHiddenFields 1
loadHiddenFields 3
loadHiddenFields 4
loadHiddenFields 5
loadHiddenFields 6
loadHiddenFields 7
loadVariables 1
loadVariables 2
loadVariables 3
loadVariables 4
loadVariables 5
loadVariables 6
loadVariables 7
'More Code here
%>
===End of Form_P2.asp=============
===Start of Include.ASP=============
aryPage1Fields = Array("lastname", "firstname", "position1", "position2"
aryPage2Fields = Array("middleinit", "maidenname", "appdate", "address", "city", "state", "zip"
Sub loadHiddenFields(pageNumber)
Execute("thisArray = aryPage" & pageNumber & "Fields"
For i = 0 To Ubound(thisArray)
Execute("thisValue = Request.Form(""" & thisArray(i) & """"
Response.Write "<INPUT type=""hidden"" name=""" & thisArray(i) & """ value=""" & thisValue & """>" & vbCrLf
Next
End Sub
Sub loadVariables(pageNumber)
Execute("thisArray = aryPage" & pageNumber & "Fields"
For i = 0 To UBound(thisArray)
Line 47>>> Execute(thisArray(i) & " = Request.Form(""" & thisArray(i) & """"
Next
End Sub
===End of Include.ASP=============
===End of CODE
Any assistance is greatly appreciated. Thanks... Thanks
-Robert
System Analyst/Programmer