Help - Search - Members - Calendar
Full Version: Minimize Script
Zymic Webmaster Forums > Web Design & Development > Client Side Scripting > JavaScript
Mr. Majestic
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?
Mr. Majestic
Anyone?
MrTouz
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.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.