Hey all,
I have code in place to set the class for an
unordered list item, <li>, to color the background
when it is selected, and then to switch it back to
the unselected color when a new one is selected
using the code below.
The issue is, as you will see, is that the current
item is lost when the page is reloaded. Most of
the calls are via AJAX so this happens only on a
couple of pages.
I'm not sure of the proper mechanism for saving
this across page loads. I know about cookies, but
I don't see how to store whole objects in cookie
name/value pairs.
Any advice is, as always, greatly appreciated.
var previousObject=0;
var previousClass=0;
function setBGColor(object)
{
previousObject.className=previousClass;
previousObject=object;
previousClass=object.className;
object.className='current';
}
--
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240
http://bigskypenguin.com
=-=-=-=-=-=-=-=-=-=
Check out PHPenguin, a lightweight and
versatile PHP/MySQL development framework.
http://phpenguin.bigskypenguin.com/
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/