My asp page has a list box that the user selects from, and then is supposed to go to the corresponding sub routine depending on what is selected.
The code looks like this:
Select Case fromForm
Case varSelect=" "
initForm
Case varSelect="ADD"
addForm
Case varSelect="EDIT"
editForm
Case varSelect="DELETE"
deleteForm
Case Else
initForm
End Select
The initial form looks like this:
Sub initForm
Response.Write "<p>Please choose one of the following options:</p>"
Response.Write "<form method='get' action='ASS3P1.asp'>"
Response.Write "<p><SELECT NAME=varSelect SIZE=1>"
Response.Write "<OPTION VALUE=''></OPTION>"
Response.Write "<OPTION VALUE=ADD>ADD</OPTION>"
Response.Write "<OPTION VALUE=DELETE>DELETE</OPTION>"
Response.Write "<OPTION VALUE=EDIT>EDIT</OPTION>"
Response.Write "</SELECT></p>"
Response.Write "<p><input type=submit></p>"
Response.Write "</FORM>"
End sub
I am using the "get" method, and am seeing it pass the varSelect variable fine. But no matter what I select ie: Add, Edit, Delete..it always comes back to the initForm??
Am I missing something here to make it go to the correct sub routine?
Thanks,
mot98..![[peace] [peace] [peace]](/data/assets/smilies/peace.gif)
"Where's the beer?"
The code looks like this:
Select Case fromForm
Case varSelect=" "
initForm
Case varSelect="ADD"
addForm
Case varSelect="EDIT"
editForm
Case varSelect="DELETE"
deleteForm
Case Else
initForm
End Select
The initial form looks like this:
Sub initForm
Response.Write "<p>Please choose one of the following options:</p>"
Response.Write "<form method='get' action='ASS3P1.asp'>"
Response.Write "<p><SELECT NAME=varSelect SIZE=1>"
Response.Write "<OPTION VALUE=''></OPTION>"
Response.Write "<OPTION VALUE=ADD>ADD</OPTION>"
Response.Write "<OPTION VALUE=DELETE>DELETE</OPTION>"
Response.Write "<OPTION VALUE=EDIT>EDIT</OPTION>"
Response.Write "</SELECT></p>"
Response.Write "<p><input type=submit></p>"
Response.Write "</FORM>"
End sub
I am using the "get" method, and am seeing it pass the varSelect variable fine. But no matter what I select ie: Add, Edit, Delete..it always comes back to the initForm??
Am I missing something here to make it go to the correct sub routine?
Thanks,
mot98..
![[peace] [peace] [peace]](/data/assets/smilies/peace.gif)
"Where's the beer?"