Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 28th, 2005, 02:19 PM
Registered User
 
Join Date: Sep 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to prepopulate a form field

I would like to learn how to prepopulate a form field on one page using a hyperlink from another.
 
Old September 29th, 2005, 08:26 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Do you want to use server-side code, e.g. ASP, or client-side?
With ASP you could have the link as:
Code:
<a href="myPage.asp?name=joe">Go to form</a>
and then in your ASP page, assuming VBScript:
Code:
<input type="text" value="<% Server.HTMLEncode(Request.QueryString("name") %>">
Using client-side you would need to parse teh location.search property and use the DOM methods to set the value of the textbox.

--

Joe
 
Old September 29th, 2005, 02:37 PM
Registered User
 
Join Date: Sep 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Joe!






Similar Threads
Thread Thread Starter Forum Replies Last Post
A Revised field on a form captainlove Access VBA 1 May 15th, 2008 07:14 AM
Prfessional Struts Applications - PrePopulate Form Mieber All Other Wrox Books 15 September 6th, 2007 01:36 AM
Currency field in a form arielote C# 0 February 27th, 2006 05:06 PM
Requery a Form Field from another Form rocknrisk Access 3 September 16th, 2005 03:51 PM
prepopulate an update form trevorml2003 SQL Language 7 January 21st, 2004 10:06 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.