LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-03-2009, 09:27 PM   #1
sir-lancealot
Member
 
Registered: Aug 2007
Posts: 346

Rep: Reputation: 31
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!
 
Old 02-07-2009, 06:33 AM   #2
shyamkumar1986
LQ Newbie
 
Registered: Feb 2009
Posts: 19

Rep: Reputation: 1
These links might help:

http://javascript.about.com/library/blwcookie.htm
http://www.devshed.com/c/a/JavaScrip...th-JavaScript/

Last edited by shyamkumar1986; 02-09-2009 at 08:43 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
root unable to write on drive mounted with read/write perrmission aquash2000 Linux - Server 5 07-19-2008 12:20 PM
Read/write locks using semaphores with write priority arunka Programming 1 06-28-2007 07:04 PM
javascript: retrieve cookie of parent page from child page kpachopoulos Programming 4 01-08-2007 05:36 AM
Javascript Cookie help master splinter Programming 2 05-12-2005 05:37 AM
Open office read only, K-write read/write mode lwtvh Linux - Newbie 1 07-19-2003 11:33 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration