I am using rails 3 to create a site with a login form.
When a non logged in user visits our website, a popup box appears at the top of the page that says ” LOGIN, SIGN UP Or CLOSE this box. “
If a user clicks LOGIN, they go to the login page. If a user clicks SIGN UP, they can go to a signup page and add their credentials. If they decide they dont want to login or sign up, they can click CLOSE, to close the box.
I am using jquery to hide the box if the user clicks CLOSE (which is good…) but… if the user reloads the page after clicking close, the box appears again (which I don’t want.)
I was assuming I’d need to use some kind of session to tell the browser they’ve already decided to close this box and they dont want to see it again (at least today.) Is this fair?
Also can I do set this session without reloading the page?
Thanks for your help.
Check out the jQuery cookie plugin. http://plugins.jquery.com/project/Cookie