Thread: Populating Form Field from URL
Results 1 to 1 of 1
Related
-
Replies: 6
-
Variable in Form action field Forum: Javascript Forum
Replies: 4 -
Extracting Form Field Values Forum: HTML Forum
Replies: 0 -
FROM: field in form Forum: Website Scripts Forum
Replies: 4 -
Pass a value from a url string to a form field Forum: HTML Forum
Replies: 5
-
10-21-2009, 01:44 PM #1
Populating Form Field from URL
I've done some searching on the forums, and have yet to find what I'm looking for. I'm not sure what language to post in, so I'm posting in HTML.
What I need is to be able to grab a section of a URL and pass it into a form text field in the page. For instance, if I visited "mysite.com/MyName", the page would show the same content as I have on "mysite.com", only adding "MyName" to a form field on the page.
An example similar (but not quite) to what I need:
Code:http://www.htmlgoodies.com/beyond/javascript/article.php/3471111
Is there a way to just grab everything after "mysite.com/" and populate a text field with it?
Does this make sense, or do I need to explain this in further detail?
Thanks in advance