• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JS Code amendment for highlighting specific text

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Team,

I am trying in vain to amend the below code with a 2nd variable.
What I am trying to achieve:
- in the column called 'Codes'
- when an AM code appears, to highlight ONLY the code (not the full line) BOLD, RED highlight, white font - the Codes will always be a text string

I have tried the following:



However
1. I'm not sure the code is correct, and;
2. I have no idea how or where to place the correct code into the below JS script that is already working

Could some please assist? I'm quite new to JS.
Thank you

 
Marshal
Posts: 4532
572
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This doesn't look right:
Comparison for equality should use: == (equal to) or === (equal value and equal type).
 
Benny Shingler
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Apologies,

I have attempted to update the code as per below but without success:

reply
    Bookmark Topic Watch Topic
  • New Topic