NetTalk Central

Author Topic: Conditionally colouring a field  (Read 2232 times)

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Conditionally colouring a field
« on: February 15, 2017, 02:17:35 PM »
HI

I want to use a dropdown box to enter text into a field.  Depending on the text chosen I want to then colour the field eg: Dropdown items: Horrid, Bad, Annoying, Ok  Colours: Red, Orange, Yellow, Green

I understand that it is not possible to attach CSS to the field that will perform the equivalent of an If then elseif etc and I have a suggestion that a combination of JavaScript and Styles could solve the problem.  A friend has written a test script - see attachment.

If this is along the right lines how could I incorporate this into the code - there is a place for JavaScript on the field (Client side tab).

Thanks

Keith
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27