Minimize Script |
||
Welcome to the Zymic webmaster forums. Our forums are here to provide people the free ability to discuss a range of websites related topics such as design, development coding and marketing.
In order to post you will need to register for a zymic account or if you already have one simply login by using the form on the left.
Zymic Webmaster Forums Web Design & Development Client Side Scripting JavaScript |
||
Minimize Script |
||
Jul 16 2008, 11:24 PM
Post
#1
|
|
|
Newbie ![]() Group: Members Posts: 14 Joined: 13-July 08 Member No.: 45,864 |
I have a script that minimizes a table when you click an image:
CODE <html> <head> <script type="text/javascript"> function show_hide(id, show) { if (el = document.getElementById(id)) { if (null==show) show = el.style.display=='none'; el.style.display = (show ? '' : 'none'); } } </script> </head> <body> <table><tr><td><a href="#" onclick="show_hide('tbl')"><img src="blah.jpg" alt="click to hide table" /></a></td></tr></table> <table id="tbl"><tr><td>test row 1</td></tr><tr><td>This is a test table!</td></tr></table></body> </html> My question is how could I store (most likely in a cookie) rather the user left the table minimized or maximized so when they returned to the page later it would be the way that they left it? |
|
|
![]() |
Jul 20 2008, 11:13 AM
Post
#2
|
|
![]() Outrageously Uber Ninja ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,196 Joined: 19-September 07 Member No.: 234 |
For cookies i would of suggest PHP, it should not be really hard to do. Ask over the PHP thread and i am sure someone will help you out.
|
|
|
![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users) |
||
| 0 Members: | ||
Forum Jump |
||
| Lo-Fi Version | Time is now: 19th May 2013 - 01:08 PM |