[thelist] Javascript: problem writing parsed URL variable to form text box

Brian Cummiskey Brian at hondaswap.com
Tue Oct 4 18:27:01 CDT 2005


Bruso, John wrote:
> I have this login form that I want to be able to feed a variable to via
> the URL.
> 
>  For example:
> http://dev.sheridan.edu/uportal/login/index.htm?uP_fname=eservices-outlo
> ok >
> 
>  So far I've managed to parse the URL and even write the variable to
>  the page, but I'm pulling my hair out trying to figure out how to
>  write that variable inside of a text box.

if you have the var, its as simple as writing the following:


document.getElementById("uP_fname").value = your_var_here;



and your form should look like:

<input type="text" name="uP_fname" id="uP_fname" />


and call it in the onload method like you're doing.


More information about the thelist mailing list