peewy
June 4th, 2003, 05:19 AM
Hi all,
About javascripting, I made a website with buttons.
When you roll over the buttons they change from colour.
Head
SCRIPT LANGUAGE="JavaScript"
!-- Begin
home= new Image();
home.src = "images2/home_over.jpg";
// End --
/script
Body
a href="home.htm"onmouseover="home.src='images2/home_over.jpg';" onmouseout="home.src='images2/home.jpg';"
img name="home" src="images2/home.jpg" border=0 width="51" height="66" /a
This is working well with more buttons, I just have to repeat the code, but I want to go further, if you click on a button it should stay in his rollovercolour (red).
So they see they are at the home-section, if they click a new button like contact, the home button should return in his normal state and normal colour. And the contactbutton should change in the rollovercolour.
I think it has to be done with a onClick function or something and then keep it in a kind of memory.
I'm hoping that someones knows the solution :ub:
thx allready
About javascripting, I made a website with buttons.
When you roll over the buttons they change from colour.
Head
SCRIPT LANGUAGE="JavaScript"
!-- Begin
home= new Image();
home.src = "images2/home_over.jpg";
// End --
/script
Body
a href="home.htm"onmouseover="home.src='images2/home_over.jpg';" onmouseout="home.src='images2/home.jpg';"
img name="home" src="images2/home.jpg" border=0 width="51" height="66" /a
This is working well with more buttons, I just have to repeat the code, but I want to go further, if you click on a button it should stay in his rollovercolour (red).
So they see they are at the home-section, if they click a new button like contact, the home button should return in his normal state and normal colour. And the contactbutton should change in the rollovercolour.
I think it has to be done with a onClick function or something and then keep it in a kind of memory.
I'm hoping that someones knows the solution :ub:
thx allready