@@ -140,6 +140,16 @@ javaxt.dhtml.Form = function (parent, config) {
140140 backgroundColor : "white" ,
141141 padding : "0 5px 0 5px" ,
142142 color : "rgb(0, 70, 138)"
143+ } ,
144+
145+
146+ //Style for the error popup
147+ error : {
148+ input : "form-input-error" ,
149+ callout : {
150+ panel : "error-callout-panel" ,
151+ arrow : "error-callout-arrow"
152+ }
143153 }
144154 }
145155 } ;
@@ -563,6 +573,7 @@ javaxt.dhtml.Form = function (parent, config) {
563573 var formInput = addInput ( name , label , input , getValue , setValue , icon ) ;
564574
565575 input . oninput = function ( ) {
576+ me . hideError ( formInput ) ;
566577 me . onChange ( formInput , input . value ) ;
567578 } ;
568579 input . onpaste = input . oninput ;
@@ -1324,7 +1335,7 @@ javaxt.dhtml.Form = function (parent, config) {
13241335 if ( inputs . length == 0 ) inputs = td . getElementsByTagName ( "textarea" ) ;
13251336 if ( inputs . length > 0 ) {
13261337 inputs [ 0 ] . blur ( ) ;
1327- var cls = "form-input- error" ;
1338+ var cls = config . style . error . input ;
13281339 if ( inputs [ 0 ] . className ) {
13291340 if ( inputs [ 0 ] . className . indexOf ( cls ) == - 1 ) inputs [ 0 ] . className += " " + cls ;
13301341 }
@@ -1342,10 +1353,7 @@ javaxt.dhtml.Form = function (parent, config) {
13421353 var callout = javaxt . dhtml . Form . Error ;
13431354 if ( ! callout ) {
13441355 callout = new javaxt . dhtml . Callout ( document . body , {
1345- style :{
1346- panel : "error-callout-panel" ,
1347- arrow : "error-callout-arrow"
1348- }
1356+ style : config . style . error . callout
13491357 } ) ;
13501358 javaxt . dhtml . Form . Error = callout ;
13511359 }
0 commit comments