[thelist] Carrying Javascript values over

Joe Crawford joe at artlung.com
Thu Mar 18 23:13:54 CST 2004

On Thu, 18 Mar 2004, The Lists wrote:
> I have a page whereby the user can hide or view parts of the page, these
> are contained within <DIV> tags, and are purely made visible or hidden.
> My question is, when the user "re-load's" the page, be it submitting on
> a form or by using a hyperlink, or just plain 'F5' is there a way to
> carry the values set by Javascript 'over' to the newly loaded page?

The first thing I can think is to use a cookie -- check
http://www.javascriptworld.com/scripts/index.html -- look at the section
on cookies to see the basics of setting and reading cookies with

> I've done a search on Google, but can't find anything, and was thinking
> about creating a session and storing the values in it, just before the
> page is exited and then retrieving them before the page loads, but how
> could I go about storing the values in a session when they are set and
> retrieved by Javascript?
> FYI I am using PHP to do the main site development.

Hope that helped,

Joe "ArtLung" Crawford   AIM:artlung   Phone:619-516-4550
LAMP Host Evangelist, Web Designer, Web Developer, WebSanDiego.org List Guy
http://joecrawford.com/  http://lamphost.net/  http://artlung.com/
http://artlung.com/blog/  http://sandiegobloggers.com/
http://sandiegoblog.com/  http://websandiego.org/

More information about the thelist mailing list