|
|
|
|
![]() ![]() |
Dec 11 2005, 12:46 PM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 407 Joined: 13-December 04 Member No.: 2,696 |
I have a HTML page with a form on it. I have an ASP page that processes what a user has entered into the form (updates a database etc).
I now need a page that fits between these two pages to “pre-process” the users input. I need to do it this way because I am not allowed to change either of the two existing pages. I know how to read what the user has input into the form and I know how to pass control onto the next page. What I have not been able to work out is how to change the user input and have those changes passed onto the next page as if nothing has happened (that is, the original ASP page just performs its request.form(“item”) calls as it always has but instead of seeing what the user actually typed in, it should see the changed text as created by the new “pre process” page) I have tried using a regular expression replace but can only successfully make this change a variable and not the original form input. Equally I cannot find a way of swapping the original form input string with the output variable from the replace. Does anyone have any ideas on this one? Thanks in advance, |
|
|
|
Dec 11 2005, 10:23 PM
Post
#2
|
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,161 Joined: 9-May 05 From: Brisbane, QLD Member No.: 6,818 |
Can you save your changes to session variables which are then passed on to the next page?
|
|
|
|
Dec 15 2005, 02:42 PM
Post
#3
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 28 Joined: 15-December 05 Member No.: 15,761 |
To achieve your purpose, it depends on how your first page sending input data to the next page.
If the first page send the data to the next page via query string, it is easy. Just re-generate the query string is OK. If the first page send the data to the next page via Session, it is also easy. You only need to modify the data and save it back to the Session... If the first page send the data to the next page via form post method, you have to create some input fields or hidden fields in your middle page. Be ware that the fields should have the same id and name as those in the first page input fields. Then you only need to modify the data and set the fields value to the modifed data. Then, you are done. QUOTE(kvarnerexpress @ Dec 11 2005, 08:46 PM) I have a HTML page with a form on it. I have an ASP page that processes what a user has entered into the form (updates a database etc). I now need a page that fits between these two pages to “pre-process” the users input. I need to do it this way because I am not allowed to change either of the two existing pages. I know how to read what the user has input into the form and I know how to pass control onto the next page. What I have not been able to work out is how to change the user input and have those changes passed onto the next page as if nothing has happened (that is, the original ASP page just performs its request.form(“item”) calls as it always has but instead of seeing what the user actually typed in, it should see the changed text as created by the new “pre process” page) I have tried using a regular expression replace but can only successfully make this change a variable and not the original form input. Equally I cannot find a way of swapping the original form input string with the output variable from the replace. Does anyone have any ideas on this one? Thanks in advance, |
|
|
|
Jan 6 2006, 08:42 PM
Post
#4
|
|
|
-=Hybrid Bus=- ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 744 Joined: 2-November 05 From: My hybrid bus (in NYC), a computer Member No.: 13,709 ![]() |
Do you want to use the response.redirect() method? if so then try this maybe:
CODE response.redirect("newpage.asp?username=" & server.urlencode(request.form("username")) & "&password=" & server.urlencode(request.form("password")) This grabs the form fields, URL-encodes them (to ensure that the browser doesn't choke on bad characters), and redirects to the next page with the URL-encoded variables in the querystring of the next page. Feel free to tinker with this. |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
Lo-Fi Version | Time is now: 26th July 2008 - 08:25 AM |