This is a discussion on Simple I think within the SQL Server forums, part of the Microsoft SQL Server category; --> I have a form that after being filled out has its contents written to a database and then goes ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I have a form that after being filled out has its contents written to a database and then goes to confirmation .asp page. I want the confirmation page to be personalized but I am not sure how to pass the "name" parameter to the confirmation.asp page. I know I am going to kick myself whrn I see this. Thanks, Houston |
| |||
| "Houston" <houston@hbip.com> wrote in message news:wctZc.15869$uY2.4368@newssvr22.news.prodigy.c om... > I have a form that after being filled out has its contents written to a > database and then goes to confirmation .asp page. I want the confirmation > page to be personalized but I am not sure how to pass the "name" parameter > to the confirmation.asp page. I know I am going to kick myself whrn I see > this. Well, you can pass any parameter to an asp page: http://www.yourwebsite.com/webpage.a...ter_name=value And in asp page itself you read it as Request["parameter_name"] Is that you were looking for? Andrey aka MuZZy |
| |||
| "Muzzy" <leyandrew@yahoo.com> wrote in message news:6NwZc.355003$%_6.328092@attbi_s01... > "Houston" <houston@hbip.com> wrote in message > news:wctZc.15869$uY2.4368@newssvr22.news.prodigy.c om... > > I have a form that after being filled out has its contents written to a > > database and then goes to confirmation .asp page. I want the confirmation > > page to be personalized but I am not sure how to pass the "name" parameter > > to the confirmation.asp page. I know I am going to kick myself whrn I see > > this. > > Well, you can pass any parameter to an asp page: > http://www.yourwebsite.com/webpage.a...ter_name=value > And in asp page itself you read it as > Request["parameter_name"] > > Is that you were looking for? > > Andrey aka MuZZy > > Yes that is what I am looking for but the value is not static and is a variable taken from the form so I am a bit confused on 2 things: 1. The syntax on the Parameter 2. If I use the URL to pass I am not clicking on the URL, I am clicking on the "Submit" button from the form. Make sence? Houston. |
| |||
| > Yes that is what I am looking for but the value is not static and is a > variable taken from the form so I am a bit confused on 2 things: > 1. The syntax on the Parameter > 2. If I use the URL to pass I am not clicking on the URL, I am clicking on > the "Submit" button from the form. Do you need to call a confirmation asp page with those parameters? I'm not sure we are on the same page... And what is your conusion about parameters syntax? http://<server>/yourpage.asp?parameter1=value1¶meter2=value2&. ..etc. Anyway, there should be a function in VB like ShellExecute or something, which calls Windows programms from VB, so you can just pass your URL to that function and it should automatically open your default browser with this URL. Andrey |
| |||
| > Yes that is what I am looking for but the value is not static and is a > variable taken from the form so I am a bit confused on 2 things: > 1. The syntax on the Parameter > 2. If I use the URL to pass I am not clicking on the URL, I am clicking on > the "Submit" button from the form. Do you need to call a confirmation asp page with those parameters? I'm not sure we are on the same page... And what is your conusion about parameters syntax? http://<server>/yourpage.asp?parameter1=value1¶meter2=value2&. ..etc. Anyway, there should be a function in VB like ShellExecute or something, which calls Windows programms from VB, so you can just pass your URL to that function and it should automatically open your default browser with this URL. Andrey |
| |||
| Ok let me take it from the top. I dont know why I am having such a hard time with this but I can not get anything to work. I am new at this but I thought I already had this part understood. Ok so here goes. I have an asp page that contains a form. The form gathers only two items, Name and EmailAddress. Once they hit SUBMIT a server behavior writes this info to the database and jumps to a confirmation page. All I want to do is personalize the confirmation page by putting in their Name. So instead of saying: "Thanks for signing up for our Newsletter" I can put: "Thank you John Doe for signing up for our newsletter." Now what do you think? "MuZZY" <leyandrew@yahoo.com> wrote in message news:iJNZc.114398$mD.68444@attbi_s02... > > Yes that is what I am looking for but the value is not static and is a > > variable taken from the form so I am a bit confused on 2 things: > > 1. The syntax on the Parameter > > 2. If I use the URL to pass I am not clicking on the URL, I am > clicking on > > the "Submit" button from the form. > > > > > Do you need to call a confirmation asp page with those parameters? > I'm not sure we are on the same page... > And what is your conusion about parameters syntax? > http://<server>/yourpage.asp?parameter1=value1¶meter2=value2&. ..etc. > > Anyway, there should be a function in VB like ShellExecute or something, > which calls Windows programms from VB, so you can just pass your URL to > that function and it should automatically open your default browser with > this URL. > > Andrey |
| |||
| Mello <!-- Hi Houston I would write a simple redirection function at the very top of the form.asp (my form name - don't know yours) page thus--> <script Language="VbScript"> <!-- myName = "<%=request("InputName")%>" function goConfirm() document.location.href="confirmation.asp?name=" & MyName & "" end function --> </script> <!--We will call this later after saving the data using the onLoad event of the body tag--> <!-- I'm creating another variable here which I will use later to see if the form has been posted or not.--> <% task = request("task") %> <!-- now for the form--> <html> <head><title></title></head> <body> <!-- The task variable and its value are passed here--> <form name="form1" method="post" action="form.asp?task=doit"> <table> <tr><td>Name:</td><td><input type="text" name="InputName" width=25></td></tr> <tr><td colspan="2"><center><input type="submit" value="go"></center></td></tr> </form> </table> </body> </html> <!-- Now check if the form was posted using the task variable--> <% IF task ="doit" THEN ''''' POPULATE VARIABLES FROM YOUR FORM FIELDS myName = request("InputName") ''''' etc, etc ''''' OPEN YOUR DATA CONNECTION ''''' DO YOUR DATA SAVE WITH USUAL SQL QUERIES ''''' CLOSE YOUR DATA CONNECTION ''''' THEN CALL THE REDIRECT FUNCTION THAT WE WROTE THUS... %> <body onLoad="goConfirm()"> <% END IF %> <!-- You will be able to capture the name value using the simple line myName = request("name") just as you did before Hope this helps --> *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
| ||||
| Houston wrote: > Ok let me take it from the top. I dont know why I am having such a hard time > with this but I can not get anything to work. I am new at this but I thought > I already had this part understood. Ok so here goes. > > I have an asp page that contains a form. The form gathers only two items, > Name and EmailAddress. > Once they hit SUBMIT a server behavior writes this info to the database and > jumps to a confirmation page. All I want to do is personalize the > confirmation page by putting in their Name. So instead of saying: > "Thanks for signing up for our Newsletter" > > I can put: > "Thank you John Doe for signing up for our newsletter." > > Now what do you think? Ok, i'm a bit confised about what exactly you can't do... Can you tell me what is the last step you are able to perform? DO you know how you add a record to the database in asp page? I really want to help but i don't know where to start? from the beginning? Andrey |