الخميس، 16 أبريل 2020

How to set link's style upon clicking using Javascript in JDEV 12c

<af:link id="l1" text="Here is a link to click"
inlineStyle="font-weight:bolder; margin-top:20px; margin-left:20px;">
<af:clientListener method="openPdfWindowCallback" type="action"/>
</af:link>
<af:resource type="javascript">
function openPdfWindowCallback(event) {
// code to open pdf window
var inputComponent = event.getSource();
console.log("My input component:", inputComponent);
var elementRefernce = inputComponent.getClientId();
console.log("my refernce:", elementRefernce);
var myLink = document.getElementById(elementRefernce);
console.log("My link:", myLink);
console.log("font weight before:", myLink.style.fontWeight);
myLink.style.fontWeight = 'normal';
console.log("font weight after:", myLink.style.fontWeight);
}
</af:resource>

ليست هناك تعليقات:

إرسال تعليق

ADF: Programmatic View Object Using Ref Cursor.

ADF: Programmatic View Object Using Ref Cursor. Posted by:  Manish Pandey   April 25, 2013   in  ADF   Leave a comment   3758 Views Sometime...