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, May 20, 2016, 01:57 PM
stur0063You 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';
May 20, 2016, 03:36 PM
jfr99Thanks ... Will give that a try. And what would I do to turn it back off?
May 23, 2016, 07:43 AM
Squatchquote:
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';
May 23, 2016, 11:58 AM
jfr99Hi,
Thanks ... That worked.
FYI ... This also worked for turning of the red border ...
document.getElementById('myWidgetID').style.border = 'none';
Thanks Again!!