• Tilak
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies

The following code makes the label of the radio option bold when it is changed.

 

<apex:selectRadio value="{!npiData}" id="npiOptions">
<apex:selectOption itemValue="Include" itemLabel="Store NPI Data"/>
<apex:selectOption itemValue="Do Not Include" itemLabel="Do not store NPI data"/>
</apex:selectRadio>

 

 

Jquery code - 

//Highlight of NPI-Option text
j$('[id$=npiOptions] input').change(function(){
j$('#npiDiv').removeClass('hilite');
j$('[id$=npiOptions] label').removeClass('hilite');
j$(this).next('label').addClass('hilite');
});

 

<style> .hilite{ font-weight:bold; } </style>

 

Now, my requirement is that if I have selected "Store NPI Data", saved it and moved on to other pages. When I come back to this page again, the "Store NPI Data" option is selected and its label should also be highlighted.

  • September 03, 2012
  • Like
  • 0

I am having a scenario where I have to make the selected option of the radio-button list highlighted i.e. bold.

<apex:selectRadio value="{!ItemData}" id="itemOptions">
                <apex:selectOption itemValue="Item 1" itemLabel="Item 1"/>
                <apex:selectOption itemValue="Item 2" itemLabel="Item 2"/>              
</apex:selectRadio>

If I select "Item 1" then the label for "Item 1" should become bold. I know this is possible using Javascript and CSS, but I am unable to find a way how to do it.

I have to use apex tags, html tags suggestions is not possible to implemented.

  • August 30, 2012
  • Like
  • 0

I am having a scenario where I have to make the selected option of the radio-button list highlighted i.e. bold.

<apex:selectRadio value="{!ItemData}" id="itemOptions">
                <apex:selectOption itemValue="Item 1" itemLabel="Item 1"/>
                <apex:selectOption itemValue="Item 2" itemLabel="Item 2"/>              
</apex:selectRadio>

If I select "Item 1" then the label for "Item 1" should become bold. I know this is possible using Javascript and CSS, but I am unable to find a way how to do it.

I have to use apex tags, html tags suggestions is not possible to implemented.

  • August 30, 2012
  • Like
  • 0