Focal Point
[SOLVED] Javascript question ...

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8357044286

May 20, 2016, 12:34 PM
jfr99
[SOLVED] Javascript question ...
Hi All,

What is the JavaScript command/setting that puts a red box around a control when you determine an error?

I display an Alert message but would like to identify the control on the page that is throwing the error (by putting a red box around the control).

Thanks

This message has been edited. Last edited by: jfr99,


WebFocus 8.201M, Windows, App Studio
May 20, 2016, 01:57 PM
stur0063
You can assign a *.css class - then swap the class on error.

Or you could do something like this:

document.getElementById('myWidgetID').style.border = '1px solid red';



webFOCUS 8207.15
WindowsServer 2019
May 20, 2016, 03:36 PM
jfr99
Thanks ... Will give that a try. And what would I do to turn it back off?


WebFocus 8.201M, Windows, App Studio
May 23, 2016, 07:43 AM
Squatch
quote:
Originally posted by jfr99:
Thanks ... Will give that a try. And what would I do to turn it back off?

Try this:

document.getElementById('myWidgetID').style.border = '0px solid red';



App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
May 23, 2016, 11:58 AM
jfr99
Hi,

Thanks ... That worked.

FYI ... This also worked for turning of the red border ...

document.getElementById('myWidgetID').style.border = 'none';

Thanks Again!!


WebFocus 8.201M, Windows, App Studio