Forums
This topic is locked
Running sub routine from a form button
03 Sep 2001 11:11:39 Bec C posted:
I have built a login page that uses the below process to login and check the user:On a form action I call this page again (login.asp)
When the submit button <> "" (when it has been clicked) my page checks for blank fields. If these are okay it process a recordset to see if the user exists and checks if the password matches this user. If it does it redirects the user back to a page and logs them in as a session variable.
My question is this:
Is there a way I can redirect the user back to the page they clicked to get here from?
I have used the HTTP_REFERER code but because I send the page to itself to login the user this code obviously then sends the user back to login.asp
Is there a way that I can run a sub routine when a user clicks on a button rather than submitting the page to itself?
How would I call ASP from a form button?
Thanks
Replies
Replied 06 Sep 2001 02:01:41
06 Sep 2001 02:01:41 Waldo Smeets replied:
Maybe you should try to write the referrer into a hidden form field. Then when submitting the page to itself it also submits the link that you are looking for so you can use it later on (Request.Form("linkTextField")
Waldo Smeets - www.UDzone.com Webmaster
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Waldo Smeets - www.UDzone.com Webmaster
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>