Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
why doesn't the text change color in the rollover?
Old 07-06-2008, 04:49 AM why doesn't the text change color in the rollover?
missingtime's Avatar
Skilled Talker

Posts: 83
Location: Athens, Greece
Trades: 0
I'm using this little button maker thingy. The buttons look nice but the color of the text is supposed to change on rollover. It worked when I had only ONE button. However, when I added another it stopped working.

Two other questions:

Does the JS code have to be in the head section of the page?

How do I add a link to these buttons?

Thank you.

CSS:

<style type="text/css">

input.groovybutton
{
font-size:16px;
font-family:Verdana,sans-serif;
color:#444444;
background-color:#FFFFFF;
border-style:solid;
border-color:#444444;
border-width:1px;
width:100px;
height:30px;
}

</style>

JS:

<script language="javascript">

function goLite(FRM,BTN)
{
window.document.forms[FRM].elements[BTN].style.color = "#33CC00";
}

function goDim(FRM,BTN)
{
window.document.forms[FRM].elements[BTN].style.color = "#444444";
}

</script>

FORM:

<form name="groovyform">
<input
type="button"
name="groovybtn1"
class="groovybutton"
value="Our Bikes"
title=""
onMouseOver="goLite(groovyform,groovybtn1)"
onMouseOut="goDim(groovyform,groovybtn1)">
</form>
</div>
<div id="buttontwo"><form name="groovyform">
<input
type="button"
name="groovybtn2"
class="groovybutton"
value="Inclusions"
title=""
onMouseOver="goLite(groovyform,groovybtn2)"
onMouseOut="goDim(groovyform,groovybtn2)">
</form>

Last edited by missingtime; 07-06-2008 at 04:56 AM..
missingtime is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-06-2008, 06:29 AM Re: why doesn't the text change color in the rollover?
missingtime's Avatar
Skilled Talker

Posts: 83
Location: Athens, Greece
Trades: 0
I understand the problem now. I changed some stuff and put the buttons in two different forms.
missingtime is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to why doesn't the text change color in the rollover?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.10208 seconds with 12 queries