function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

command link color change

I have 5 records in pageblock table.. 1st field is a command link using param tag.. when i click 1 means , 1 will be change an red color... others are same standard color.. if i click 2 means , 2 has a red color and 1 has change into old color like standard color.. if  i click 3 means , 3 changed as a red.. remain all are standard color


You need to pass id of that record .That means you have to use some wrapper class to get particular record id. Then just use some java script code to change the color .

Here is link of my post to change the color of text while clicking


Go thorough this for wrapper class and passing id to javascript function. Also you can visit my blog


This all are not my exact requirement.. any way thanks


Hi Diya


I have not given the direct solution, I have just shared some reference where you can get some idea to do your requirement.


Your requirement 

Let Pageblock table contains 5 records. all are in black color text. When someone click on one record that record text is will be red color.


I have shared links about how text color is changed, abd how to pass id.  Anyways feeling happy to ans you