Zymic Forums

Webmaster resources

Zymic IRC Server

Chat in real time at irc.zymic.com - Learn More

Welcome

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.

left Zymic Webmaster ForumsWeb Design & DevelopmentClient Side ScriptingJavaScript right
left right
Mr. Majestic
post 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>
&lt;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?
Go to the top of the page 
 
  + Quote Post
 
Start new topic
Replies (1 - 1)
MrTouz
post 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.
Go to the top of the page 
 
  + Quote Post
 Closed Topic Start new topic
left right
0 Members:
left right
 


Lo-Fi Version Time is now: 19th May 2013 - 01:08 PM