Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

OnChange vs OnExit

$
0
0

Good morning all,

 

I have this method:

 

var successFillColor = "204,255,255"; //Aqua

var reqFillColor = "255,255,0"; //Yellow

function validateACESID()

{

        var _Pattern = /^(\d{7})$/;

 

               var entered_text = VisitInformation.PatientInfo_subform.ACESID_TF.rawValue;

 

               if(_Pattern.test(entered_text))

               {

                              unHighlight(VisitInformation.PatientInfo_subform.ACESID_TF) ;

               }

               else

               {

                              requiredHighlight(VisitInformation.PatientInfo_subform.ACES ID_TF);

               }

}

function unHighlight(fld)

{

               fld.fillColor = successFillColor;

}

function requiredHighlight(fld)

{

               fld.fillColor = reqFillColor;

}

 

When I call this method with "VisitInfo_Validation.validateACESID();" in OnExit it works perfectly, it highlights it yellow when the value is not 7 digits and then highlights it aqua when it is. Now, when I call this method in the OnChange it doesn't catch the true clause of the if statement, only the else.

 

If anyone can shed some light on this that would be very appreciated, thank you.

 

 

james


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>