
I have found a lovely nifty little bit of code that allows the user to change the background colour in a browser instantly. It works lovely in IE but I'm buggered if it'll work in Firefox, has anyone got any ideas they might be able to give me without killing me?
also

( ,
Fri 16 Dec 2005, 15:33,
archived)
also


quite handy that
( ,
Fri 16 Dec 2005, 15:33,
archived)

What I mean is I have a drop-down on a pgae I'm doing that allows the visitor to choose a colour and bob's you uncle, the BG changes. This drop-down doesn't work in Firefox :(
Most vexing
( ,
Fri 16 Dec 2005, 15:41,
archived)
Most vexing

check www.alistapart.com, there were like three of those there.
Alternatively, let me do one. Back in a sec.
( ,
Fri 16 Dec 2005, 15:45,
archived)
Alternatively, let me do one. Back in a sec.

`tis quite easy
( ,
Fri 16 Dec 2005, 15:52,
archived)

www.zen32721.zen.co.uk/bgchange.html
does the trick. Pretty useless though, as it doesn't store the setting.
( ,
Fri 16 Dec 2005, 15:57,
archived)
does the trick. Pretty useless though, as it doesn't store the setting.

"Happy birthday, You're adopted!" on it - but I'm buggered if I can find it now...
( ,
Fri 16 Dec 2005, 15:44,
archived)

But seen it around, seems to be an oldie
( ,
Fri 16 Dec 2005, 15:56,
archived)

works for me.
(edit: in Firefox.)
( ,
Fri 16 Dec 2005, 15:46,
archived)
(edit: in Firefox.)

try using <a href="#" onClick="body.bgColor='#FF0000'; return true;">make it red</a>
( ,
Fri 16 Dec 2005, 15:57,
archived)

return true sends the clicker to the top of the document, and that is nothing you want. The example above could also be backed up with a server side thingy for the non-javascript peeps.
Or you can add a cookie function to store the choice = sexy (or not).
( ,
Fri 16 Dec 2005, 16:02,
archived)
Or you can add a cookie function to store the choice = sexy (or not).