This page (http://forums.iis.net/t/1153336.aspx) explains how to do exactly what I am wanting to do, except due to the limitations of our system I only get to enter javascript to pull this information into the textbox. Can someone explain how I can use a parameter in a URL to auto fill a textbox?
You can use location.search to access the url query and inject it into your text value
If your url is /page.htm?x=y, you can use the following code to set the value of a text field. This post tells you how to grab values from the query string
// See the link above for getUrlParams
var params = getUrlParams();
document.getElementById('myTextFieldId').value = params.x;
Notice that the example you've linked to suffers from a http://en.wikipedia.org/wiki/Cross-site_scripting vulnerability. To avoid that, you must escape the HTML before you output it on the screen
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With