JavaScript Login Cookie help!

Please help!

When my users log in over the web, I need my app to write two cookies, one that captures their user name and one that captures their employee ID. I have created a form for the ‘home page’ that prompts them to log in, and then put two fields on there that are populated with their user name (Name) and their Employee ID (EmployeeID). Please can someone tell me how to write these fields to a cookie each? I am very new to javascript and have been playing with some downloaded examples, but they don’t seem to help. One captured the server name in the cookie and I need it to capture just the domain.

Finally (!)please could someone explain where to put the code on the form? I.e. OnLoad? etc etc or do I just put it on the form and ‘pass through HTML’???

Any help would be gratefully received !!!

Thanks

Subject: JavaScript Login Cookie help!

Hi,

document.cookie=“cookiename=cookievalue”;

should do the trick.

Best regards
Mario Varchmin
http://www.e-llennium.de/e-llennium/index_en.htm

Subject: RE: JavaScript Login Cookie help!

So how do I reference my field in the value bit?

Subject: JavaScript Login Cookie help!

Not sure I know what you are looking for, but why do you have to use a cookie to get this information.

If you are having the user login then you already know who they are so you can capture that information then and there.