Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pre-populate field using url

Status
Not open for further replies.

Krusher

IS-IT--Management
Jan 2, 2003
70
US
Folks,
I've seen this done before, but am not sure what the code looks like. I'd like to pre-populate an input text field on a form with data passed from the url. For example: I have a field called "name", and I'd like to populate the "name" field with the data "JohnSmith" by using the following url:


Any help on doing this would be greatly appreciated!

-K
 
That is generally done using some kind of programming language. Be it client Side. i.e Javascript, or Server Side, i.e. PHP, ASP etc...

Depending on the language you are using in your webpages is the code you are going to get.

Of course you could also browse the appropriate forums and ee if they have something that might solve your problem easily.

Javascript: forum216
PHP: forum434

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
I would advise against doing this client-side, unless you know your target audience will not have disabled JavaScript. Do this server-side if you can... your client-side code will be ultimately smaller and more portable if you do.

Hope this helps,
Dan


[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top