Image

Imagevalkyri wrote in Imagewebdev

ASP Help!

Here's the deal:

Creeping specs dictate that I have to move my re-entrant code to separate files. I have used multiple javascript calendar controls, and that particular control (I didn't write it) throws errors unless all of them are enclosed in one form tag, I'm not sure why, but I don't understand the javascript well enough to figure it out, alas, I am in a hurry, I have to find another way.

http://www.mattkruse.com/javascript/calendarpopup/ is the link the control that I'm using.

Anyhow, basically my code used to look like this:

if request.form("Whatever") = "Something" then
...Call a function that loads the page
elseif request.form("AnotherOne") = "Something Else" then
...Call the function that loads that page
.
.
end if

FunctionsAndSubs()

end FunctionsAndSubs()

It works fine, but for some reason, my supervisor does not want it this way, he wants it so that all those functions and subs are different files. It requires posting data, so a simple redirect will not do.

I had the idea - to change the "action" depending on which button on the form was chosen:

response.write "<form method='post' action='" if request.form("Whatever") = "Something" then response.write "FileName.asp" elseif ...etc end if I'm not in the mood to start over on this - it's over 1000 lines. It works, on the second push of the button. If I could force a refresh *somewhere* then it may work... Any ideas?