Hi,
I'm relatively new to Javascript so please bear with me on what
might sound like silly questions.
This is what I want to do:
I'm working in classic asp (I have to for this project). I need
to:
1. Click a submit button on an asp page, calling another page
that saves the contents of that form to a database and then displays
some information from the form. Obviously this part is simple. So
let's call these two forms form1 and form2.
2. Here's the part I don't understand. Sometime after the
user clicks the submit button, I would like the user to see a
confirmation message asking them if they want to do a certain task
that. If the user says "yes" I want the code to branch off to a third
asp page (form3), do an update to one specific field in the database,
and then return to the calling code.
I've considered having this occur right when the user clicks the
submit button (on form1; this would mean that after the execuation of
form3 the program would return to form1.But it occurred to me that it
would be better to have the code save the form contents to the
database before the confirmation message comes up; this would mean
that the program would return to form2 after executing form3. I'm not
sure which is best
I'm not really used to "branching" using javascript. What needs to
happen is the code needs to branch to form3 (depending on if the user
clicks "yes" in the confirmation box) and then the program needs to
return to the calling asp page to continue the original processing.
Also the form fields need to be available to the calling asp page as
"request.form" variables(after the return from form3) so that it can
continue it's work.
The only thing I've seen that runs an asp page and then returns is
"sever.execute". This is a vbscript command for ie as far as I know
and I'm wondering if there is something similar in javascript. I would
suppose it would be like "window.location".
Any help would be appreciated. I am open to some other method of
doing this than I've outlined here. I feel I've probably missed
something.
Neil