Forums
This topic is locked
Automaticaly populate field
Posted 02 Sep 2002 12:24:16
1
has voted
02 Sep 2002 12:24:16 Perry Gascoine posted:
I have a login page on my site where users enter user name and email address. This then takes them to a secure page with 3 form fields (user_name / email / close_date) where I would like the user name and email address to be populated automatically in user name and email.The close_date field will be entered by them.
If anyone know how or even better a tutorial that shows how please let me know.
Cheers
Perry
Replies
Replied 02 Sep 2002 17:09:01
02 Sep 2002 17:09:01 aegis kleais replied:
Well, assuming that you're using a POST method of data submission, try the following:
On the page that needs to show the username and email entered, and assuming the previous page's form elements were called txtUsername and txtEmail, use this code on the second page:
<input type="text" name="username" value="<% Server.HTMLEncode(Request.Form("txtUsername"
) %>">
<input type="email" name="email" value="<% Server.HTMLEncode(Request.Form("txtEmail"
) %>">
That should place the values of the submitted values to the form elements
Aegis Kleais
New Media Web Developer
(DWMX : IIS5.1 : SQL2K : WXP : ASP[VB/JS])
On the page that needs to show the username and email entered, and assuming the previous page's form elements were called txtUsername and txtEmail, use this code on the second page:
<input type="text" name="username" value="<% Server.HTMLEncode(Request.Form("txtUsername"

<input type="email" name="email" value="<% Server.HTMLEncode(Request.Form("txtEmail"

That should place the values of the submitted values to the form elements
Aegis Kleais
New Media Web Developer
(DWMX : IIS5.1 : SQL2K : WXP : ASP[VB/JS])