Skip to Main Content

APEX

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!

Change background / text color using Javascript

CherniFeb 12 2007 — edited Feb 13 2007
Hi all,

I am developing using Application Express 1.6 and I need to be able to highlight a row, either change the background color or the the text color when a user clicks an icon to view more info on the row. I have tried changing the javascript that changes the background color onmouseover but it doesnt seem to work. here is the code

<script language="Javascript">
function dochangebackground(rowNode,currentRowNum) {
for( var i = 0; i < rowNode.childNodes.length; i++ ) {
if (rowNode.childNodes.tagName=='TD') {
rowStyleHover[currentRowNum] = rowNode.childNodes[i].style.backgroundColor;
rowNode.childNodes[i].style.backgroundColor = '#000000';
}
}

}

</script>

and the call to the script is -> javascript:onClick=dochangebackground(this,'#ROWNUM#');

This is placed in the column link section of the id i am passing. the target is a url.

Does anyone have any ideas on how to accomplish this or a better way to do it?
Thanks a mil!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 13 2007
Added on Feb 12 2007
3 comments
664 views