javascript write/read cookie
Evening all, I am more the sysadmin and was asked a favor. I know my php pretty well, but I need to do the following;
This is in lightbox so all the smary templates are all over, so trying to find where forms go is just a nightmare; the form I need looks like this;
<form name="login_form" action="{$GALLERY_FILE_NAME}" method="post">
and I am not sure how lightbox/templates work so well yet, so I don't know where these things are defined.
Anyway, that login has a basic un/pw and all I want is a remember me checkbox. If I knew the posted page I could do it via php, but since I can't I figured use javascript, do an onSubmit to a function that would drop the cookie of un/pw then submit the form. I assume that's quite possible (and simple) am I right?
Then on the form page, I would guess the body tag I could do an onLoad, look for the cookies (user and pass) if they are there, pre-populate and even submit, am I correct in these assumptions?
If so, how tough for a php guy to figure it out, or if anyone already has some of this code done, it's appreciated to just dump it on a post here!
Thanks.
Also, if someone is familiar with lightbox/smarty templates and can tell me where those var's are defined I can do it myself in php!
|