[Javascript] Extracting data from current URL

Steve Hearne steve.hearne at mvc-ent.co.uk
Wed May 23 03:44:38 CDT 2001


Hello.

I would really like to be able to extract some information from a URL.  At my company we use a portal which acts as the core of our intranet.  In order for our users to transparently login to to this portal, I have supplied each of them with a URL containing username, password and servername etc.  This looks something like;

http://servername/servlet/WebClient/main?user=stevehearne&pass=mypassword&server=127.0.0.1 

Now, when a user has to,for instance fill out a form, then I'd really like to be able to know what their username is...Can i parse this URL with JavaScript once they've arrived at the homepage in order to discover their username?

Thanks for any help or advice you can offer,
Steve






More information about the Javascript mailing list