WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You

WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1Cookie Based Show / Hide Empty Cookie Based Show / Hide Wed Jan 12, 2011 5:39 am

Syfte

Syfte
Registered Member
Registered Member
How can I show / hide content and have it shown / hidden when the page is refreshed or revisited?

I have a toolbar in my forum. If someone presses a button, the toolbar will disappear. If they go to, per say a topic, the toolbar will still be hidden. Then if they press another button it will reappear. Can it be done?

I have forum version phpBB3 and you can see my codes if you reply. Thanks Smile



http://www.spotfeed.net

2Cookie Based Show / Hide Empty Re: Cookie Based Show / Hide Sat Jan 15, 2011 9:22 am

Syfte

Syfte
Registered Member
Registered Member
Bump.

http://www.spotfeed.net

3Cookie Based Show / Hide Empty Re: Cookie Based Show / Hide Sat Jan 15, 2011 6:21 pm

ankillien

ankillien
Administrator
Administrator
Hi,

It can be done with JS cookies. Have you learnt about cookies?
You can set different values for the cookie on the click event. So, the cookie will have value "HIDE" when clicked first and "SHOW" when clicked another time Very Happy

http://www.w3schools.com/JS/js_cookies.asp

4Cookie Based Show / Hide Empty Re: Cookie Based Show / Hide Sun Jan 16, 2011 11:19 am

Syfte

Syfte
Registered Member
Registered Member
ankillien wrote:Hi,

It can be done with JS cookies. Have you learnt about cookies?
You can set different values for the cookie on the click event. So, the cookie will have value "HIDE" when clicked first and "SHOW" when clicked another time Very Happy

http://www.w3schools.com/JS/js_cookies.asp
I haven't learned it...yet. I just assumed that cookies would be what saves their choice.

I learned some basic Javascript at w3schools but looking at that tutorial I get a bit confused tongue Do you think I should continue learning or can I dive right into the lesson without further knowledge?

http://www.spotfeed.net

5Cookie Based Show / Hide Empty Re: Cookie Based Show / Hide Sun Jan 16, 2011 9:48 pm

ankillien

ankillien
Administrator
Administrator
Cookies can be bit hard to learn for a beginner.
I'll try to write a script for this.

6Cookie Based Show / Hide Empty Re: Cookie Based Show / Hide Mon Jan 17, 2011 1:42 am

Guest


Guest
Ankillien, I don't think this crosses the line for advertising, but if it does, you may remove the link.

I've already written a tutorial for setting/saving cookies. It would be very easy to modify the tutorial to toggle the CSS display property.

http://ipbdion.forumotion.com/-t93.htm

7Cookie Based Show / Hide Empty Re: Cookie Based Show / Hide Mon Jan 17, 2011 3:01 pm

ankillien

ankillien
Administrator
Administrator
dion wrote:Ankillien, I don't think this crosses the line for advertising, but if it does, you may remove the link.

I've already written a tutorial for setting/saving cookies. It would be very easy to modify the tutorial to toggle the CSS display property.

http://ipbdion.forumotion.com/-t93.htm

That can't be considered as advertising since the link is helpful.

I forgot about the my_secookies() function. It becomes much easier with these functions to deal with cookies Very Happy

8Cookie Based Show / Hide Empty Re: Cookie Based Show / Hide Wed Feb 02, 2011 6:49 am

Syfte

Syfte
Registered Member
Registered Member
Ok so I read over more of the lessons and then tried to interpret the script here. Honestly it didn't go so well =P And I still did't get the cookies. Sorry Embarassed

http://www.spotfeed.net

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum