b3ta.com board
You are not logged in. Login or Signup
Home » Messageboard » XXX » Message 5446244 (Thread)

# Help...
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)
# what about the Edit CSS extension for firestoat?
quite handy that
(, Fri 16 Dec 2005, 15:33, archived)
# I am a big fan of that extension but
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)
# sounds like a normal css switcher to me
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)
# you can do that with bog standard html and a little bit of javascript
`tis quite easy
(, Fri 16 Dec 2005, 15:52, archived)
# this
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)
# Sorry - clueless
Excellent emo card tho'
(, Fri 16 Dec 2005, 15:36, archived)
# hahaha nice
(, Fri 16 Dec 2005, 15:40, archived)
# I once did a birthday cake with
"Happy birthday, You're adopted!" on it - but I'm buggered if I can find it now...
(, Fri 16 Dec 2005, 15:44, archived)
# this one?
(, Fri 16 Dec 2005, 15:53, archived)
# Actually no,
But exactly the same joke...
(, Fri 16 Dec 2005, 15:55, archived)
# that one is not my work
But seen it around, seems to be an oldie
(, Fri 16 Dec 2005, 15:56, archived)
# all the best jokes appear here first ;)
(, Fri 16 Dec 2005, 16:06, archived)
# and second
and third...
(, Fri 16 Dec 2005, 16:17, archived)
# <a onClick="body.bgColor = 'green'">Click to change colour</a>
works for me.
(edit: in Firefox.)
(, Fri 16 Dec 2005, 15:46, archived)
# Works for me too,
But not in Firefox... :(
(, Fri 16 Dec 2005, 15:51, archived)
# it should work
try using <a href="#" onClick="body.bgColor='#FF0000'; return true;">make it red</a>
(, Fri 16 Dec 2005, 15:57, archived)
# return false
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)
# yeah do it server side
one thing I`ve learned is never to trust browser capabilities
(, Fri 16 Dec 2005, 16:09, archived)
# Thank you sir
(, Fri 16 Dec 2005, 16:03, archived)