Closed Thread Icon

Topic awaiting preservation: Onclick remember textbox fields Pages that link to <a href="https://ozoneasylum.com/backlink?for=8737" title="Pages that link to Topic awaiting preservation: Onclick remember textbox fields" rel="nofollow" >Topic awaiting preservation: Onclick remember textbox fields\

 
Author Thread
elvisedge
Obsessive-Compulsive (I) Inmate

From:
Insane since: Jul 2003

posted posted 07-01-2003 03:06

Regularly, employees within the business need to log into (username & password) a few different sites. I have placed links to the 'log-in' pages of the sites, onto a internal server page. The username and password for all employees is the same for all the sites.

I want to be able for people to click on the website link, and when the page opens in a new browser window, the username and password text-field boxes are already filled in with the correct username/password.

(ie, onclick enter fields into the link page textboxes (form)).

If anyone can help with this it is much appreciated.

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 07-01-2003 07:00

Not a big deal.

Just set a cookie with the username/password. Here's the deal. There are security risks involved with saving a password in a cookie.

A. Anyone logging onto the computer can log in using someone else's password.
B. Cookies are readable from the browsers cache and could be used to retrieve someone's password.

So I'd recommend just saving the username. BTW both IE and NN have this functionality built in as well

JS Cookie Tute


Using the above tute will teach you how to set and retrieve a cookie. Once uou can get a variable set using cookies you can set the field of a form using

document.forms['formName'].elements['fieldName'].value = userNameVar



.:[ Never resist a perfect moment ]:.

elvisedge
Obsessive-Compulsive (I) Inmate

From:
Insane since: Jul 2003

posted posted 07-01-2003 09:21

Thanks very Much!

Another question though,
Is there any way that you can totally overlook going to the login page?

ie, Clicking on the website link will - instead of taking you to the login page with the fields filled in - automatically log you in. (you do not have to click any 'login' button.)

Is there a possible way, something like:
www.mysite/admin.asp password=PASSTEST&username=USERTEST

??

Sorry but I really have no idea.

« BackwardsOnwards »

Show Forum Drop Down Menu