Welcome Guest, Not a member yet? Register   Sign In
How to get a button to save session data?
#1

[eluser]kaos78414[/eluser]
I know the topic is a little confusing but I was having trouble figuring out how to word it.

I have a little about-us kinda div on the front page, and added some jquery to make it closeable for those who find it annoying. What I'm wondering, is if there is a way that I can make it so that when you press the close button, session data is added that basically says that you closed it, so it doesn't pop back up until the session expires.

I'm not sure if I can do this solely with PHP, or if there is some javascript involved.

The jquery involved is short and sweet, if you need to see it, it looks like this:
Code:
$(document).ready(function(){

$('a#hide-button').click(function(){
$('#about-box').slideUp('fast');
});

});

Any ideas as to how this can be accomplished?
#2

[eluser]Eric Barnes[/eluser]
I believe you would just use cookies in the javascript code. I know jquery supports this.
#3

[eluser]ram4nd[/eluser]
Look into ajax at jquery Docs. About post and get.




Theme © iAndrew 2016 - Forum software by © MyBB