Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Bold the radio buttons when selected.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Bold the radio buttons when selected.
 Login/Join
 
Member
posted
hi
i am trying to bold the selected option of the radio button, where am not able to bold them.
can any one suggest some ideas on this. i have written a function for this in javascript like the below

function highlight()
{
var radios = document.getElementsByName('radio2');
for (var i = 0; i < radios.length; i++)
{
radios[i].onchange = function ()
{
document.getElementsByName(radios[i].value).style.fontWeight='bold';
alert(this.value);
}
}

}

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7.6, 7.7, 8.1.05
Windows, All Outputs
 
Posts: 25 | Registered: April 11, 2013Report This Post
Expert
posted Hide Post
You can't bold the radio button, you can bold the label (or text) next to the radio button. But if you bold the text of the selected radio button then you have to "un-bold" the text of the unselected radio button. It's probably not worth the trouble - isn't it obvious which radio button is selected?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
Hi Francis
Yes am wrong, i need to bold the label next to the radio button. yes when ever the radio button is selected, it has to be bolded and the other options need to be unbolded.
the requirement which am working on has some aged customers so they suggested in this way.

thanks
kishore


WebFOCUS 7.6, 7.7, 8.1.05
Windows, All Outputs
 
Posts: 25 | Registered: April 11, 2013Report This Post
Virtuoso
posted Hide Post
First of all, the element that you're attempting to apply that style to probably doesn't exist, as you apply it to any element that has a name consisting of the value of each radio button.

You probably meant to do:
if (radios[i].checked)
    radios[i].style.fontWeight='bold';


But, as Francis already pointed out, you need to bold the lable, not the radio button. How to do that depends on how you implemented your labels: Did you wrap your radio-buttons inside your labels or are they separate elements referring to your labels using the "for"-attribute?


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Member
posted Hide Post
hi wep,
i have created the labels as seperate elements using the "for" attribute.

thanks in advance
kishore adhikari


WebFOCUS 7.6, 7.7, 8.1.05
Windows, All Outputs
 
Posts: 25 | Registered: April 11, 2013Report This Post
Member
posted Hide Post
hi francis/wep

this is the updated function which worked out for me.

function highlight()
{
var radios = document.getElementsByName('radio2');
for (var i = 0; i < radios.length; i++)
{
radios[i].parentNode.style.fontWeight='';
if (radios[i].checked)
{
radios[i].parentNode.style.fontWeight='bold';
}
}
}

thanks for your support here. it helped me alot.

thanks
kishore adhikari


WebFOCUS 7.6, 7.7, 8.1.05
Windows, All Outputs
 
Posts: 25 | Registered: April 11, 2013Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Bold the radio buttons when selected.

Copyright © 1996-2020 Information Builders