about buttons

  • dmx1999
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Sep 07, 2003
  • Posts: 12
  • Status: Offline

Post September 14th, 2003, 3:08 pm

hello
i want to make a set of buttons that look like this:

|A|B|C|D|E|F|

and the back ground color for all these buttons are white
but then i click a botton, say C, the background in C changes to blue and all others remains the same

and then if i click botton D, C returns to white and now D is in blue...

wonder how i can do that

btw, my botton are organized with tables

thank you
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post September 14th, 2003, 3:08 pm

  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Joined: Jun 15, 2003
  • Posts: 4583
  • Loc: Maryland
  • Status: Offline

Post September 14th, 2003, 5:51 pm

I have to write an AP american essay, otherwise i'd try to throw together a script, but you basically want to change the background color style of the cell with an onMouseOver event...something like
Code: [ Select ]
onMouseOver="parent.table.cell.style.background-color='color'"

or something
Pixel Acres V2
  • dmx1999
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Sep 07, 2003
  • Posts: 12
  • Status: Offline

Post September 14th, 2003, 9:17 pm

hm....
mouseover only allows the bgcolor to change when the mouse is pointing at my link
but.... i want the color to change back to white when OTHER links are clicked....

thanks anyway :)
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Joined: Jun 15, 2003
  • Posts: 4583
  • Loc: Maryland
  • Status: Offline

Post September 17th, 2003, 4:23 pm

then you have to probably make a function that you can use to reset the other bgcolor. Sounds like your are making a tab system?
Pixel Acres V2
  • musik
  • Legend
  • Super Moderator
  • User avatar
  • Joined: Aug 06, 2003
  • Posts: 6892
  • Loc: up a tree
  • Status: Offline

Post September 17th, 2003, 4:45 pm

easy peasy :D

Paste this somewhere in the <head> section and play around with the colour values till you find what you like.


<style type="text/css">
<!--

a:link {color:#000000; text-decoration:none}
a:active {color:#000000; text-decoration:none}
a:visited {color:#000000; text-decoration:none}
a:hover {background-color:#0000FF; text-decoration:none}

-->
</style>




Hope that helps,
Rose :D
Opportunity To Do - Changing the lives of children around the world.
Rose.id.au - Doing Life.
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Joined: Dec 20, 2002
  • Posts: 6382
  • Loc: twitter.com/unflux
  • Status: Offline

Post September 17th, 2003, 4:50 pm

i think what he's asking for is the selected page that was clicked, to be
a different color than the others when THAT page is showing.
UNFLUX.FOTO
  • musik
  • Legend
  • Super Moderator
  • User avatar
  • Joined: Aug 06, 2003
  • Posts: 6892
  • Loc: up a tree
  • Status: Offline

Post September 17th, 2003, 4:55 pm

wouldnt that just be his page background then?

i thought he was talking about his text button menu, for the background of whatever button is going to be clicked to turn blue, then when another is selected it will go back to white.
Opportunity To Do - Changing the lives of children around the world.
Rose.id.au - Doing Life.
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Joined: Jun 15, 2003
  • Posts: 4583
  • Loc: Maryland
  • Status: Offline

Post September 17th, 2003, 5:27 pm

he probably wants something like this:
Code: [ Select ]
/---\/___\/___\
|--------------|
|--------------|
|--------------|
  1. /---\/___\/___\
  2. |--------------|
  3. |--------------|
  4. |--------------|


where the --- are all uniform in color, then when you click on the second tab, the first tab changes back to "__" and the new tab gets the "---" color.
Pixel Acres V2
  • dmx1999
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Sep 07, 2003
  • Posts: 12
  • Status: Offline

Post September 17th, 2003, 7:53 pm

Yes this is what i want (or at least close to )



/---\/___\/___\
|--------------|
|--------------|
|--------------|

I think i will need to reset my bgcolor everytime another link is clicked...
but i dont' have any clue how i can do that with Javascript
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Joined: Jun 15, 2003
  • Posts: 4583
  • Loc: Maryland
  • Status: Offline

Post September 18th, 2003, 3:13 pm

you have to do something similar to my previous snippet, where you just call the cell that you want changed by its id, and change the color. Hope thta makes sense, I am not the best at JS.
Pixel Acres V2
  • musik
  • Legend
  • Super Moderator
  • User avatar
  • Joined: Aug 06, 2003
  • Posts: 6892
  • Loc: up a tree
  • Status: Offline

Post September 18th, 2003, 10:42 pm

You've totally lost me, wtf is that? lol....
Opportunity To Do - Changing the lives of children around the world.
Rose.id.au - Doing Life.
  • dmx1999
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Sep 07, 2003
  • Posts: 12
  • Status: Offline

Post September 18th, 2003, 11:47 pm

sorry
i lost you
for onmouseover event, here is an example:

http://www.computerhope.com/onmouse.htm#example

like... when you point your mouse at the cell, it will change color, but i am not sure how that is related to changing the color of the clicked cell even after the mouse is gone.
And also, reseting is color to white.... i don't have any idea how to do that :shock:
hm... wonder if this can be done with pure html...
  • musik
  • Legend
  • Super Moderator
  • User avatar
  • Joined: Aug 06, 2003
  • Posts: 6892
  • Loc: up a tree
  • Status: Offline

Post September 18th, 2003, 11:56 pm

ohhh is that all !_! :wink:
Opportunity To Do - Changing the lives of children around the world.
Rose.id.au - Doing Life.

Post Information

  • Total Posts in this topic: 13 posts
  • Users browsing this forum: No registered users and 115 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.