Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Background color of commandImageLink

User10428833-OracleJun 22 2009 — edited Jun 22 2009
HI,

I am trying to change the background color of the commandImageLink using the below three clientListener:

<af:clientListener method="onMouseOver" type="mouseOver"/>
<af:clientListener method="onMouseOut" type="mouseOut"/>
<af:clientListener method="onClicked" type="click"/>

Implementation is below:

function onMouseOver(event) {
var evnSrc = event.getSource();
evnSrc.setInlineStyle("background-color:rgb(0,181,0);");
}
function onMouseOut(event) {
var evnSrc = event.getSource();
evnSrc.setInlineStyle("background-color:rgb(82,140,255);");
}
function onClicked(event) {
var evnSrc = event.getSource();
evnSrc.setInlineStyle("background-color:rgb(168,41,0);");
}

but the problem is that when I click on the link, It should not change the backgroundcolor even if I move the mouse over the link. Link background color should remain same until another link is clicked.

Can anybody tell me How can I implement this?

Edited by: user10428833 on Jun 22, 2009 2:15 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 20 2009
Added on Jun 22 2009
3 comments
385 views