Welcome Guest, Not a member yet? Register   Sign In
Setting session variable by clicking on "toggle"
#1

[eluser]aaronr[/eluser]
I'm setting up a little portfolio of some of my work. I have a big graphic (in a div) on every page, it calls in a random image on each page. I also have a jquery hide/show toggle to hide the big graphic.

All of that is working. What I want to do is if someone clicks on "hide" and goes to another page (which causes a page reload of course) I want that big graphic (in a div) to stay hidden.

Can someone send me in the right direction to how to set a session variable via jquery (or regular .js)?

Thanks
#2

[eluser]Buso[/eluser]
you need to use ajax

just create a controller/method pair (or use an existing controller) that does the saving, and call it with an ajax request http://api.jquery.com/jQuery.post/




Theme © iAndrew 2016 - Forum software by © MyBB