NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Keith on February 15, 2017, 02:17:35 PM

Title: Conditionally colouring a field
Post by: Keith 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