HI again everyone!
Is it posible when in a numeric field(9 digits allaw) the first entered numbers are 202 a pop-up warning to come up(Please copy to...).
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
If you want the popup to display only once, then place the below code in the exit event of the NumericField.
var
strNewtext = NumericField1.rawValue.toString();
if
(strNewtext.length>3){
if(strNewtext.substring(0,3)=="202")
xfa.host.messageBox("This number is starting with 202");
}
Thanks
Srini
Views
Replies
Total Likes
xfa.event.newText command will give you the text of the field. Use that command in the Change event of the control.
Then use substring command in java script to verify the first 3 digits and display a messagebox if it meets your criteria.
Thanks
Srini
Views
Replies
Total Likes
If you give me a little more help I will appreciate very much!
I am not a programmer to write the script I need...
Thanks very much for all your help
Views
Replies
Total Likes
Try putting the following code in the change event of the numeric field.
var strNewtext = xfa.event.newText;
if(strNewtext.length>3){
if(strNewtext.substring(0,3)=="202")
xfa.host.messageBox("This number is starting with 202");
}
Thanks
Srini
Views
Replies
Total Likes
Thanks for your help Srini, I really appreciate!
My numerical field requires 9 digits, and the problem I have with your script any time I enter digit after the third one the pop-up repeat and repeat again.
Any solution?
Thanks for your time
Views
Replies
Total Likes
If you want the popup to display only once, then place the below code in the exit event of the NumericField.
var
strNewtext = NumericField1.rawValue.toString();
if
(strNewtext.length>3){
if(strNewtext.substring(0,3)=="202")
xfa.host.messageBox("This number is starting with 202");
}
Thanks
Srini
Views
Replies
Total Likes
THANKS Srini
Views
Replies
Total Likes
Thank you..
If you feel your question is answered, then you can click on the Answered button. So that this thread will be moved to the closed threads.
Otherwise it will be in the open thread state.
Thanks
Srini
Views
Replies
Total Likes
Hi Srini,
here is the script I use for a email button:
form1.Sub_All.Sub_4.Footer.Mail::click - (JavaScript, client)
if(Init.Ex1ValidFields())
var myDoc = event.target;
var address = "xxx@xxx.org";
var sub = "Maintenance Form";
var msgBody = "See my Maintenance Requisition Form attached.\n\nThank You!";
var Sender = form1.Sub_All.Sub_2.Department.rawValue;
myDoc.mailDoc({ bUI: false,
cTo: address,
cSubject: sub + Sender,
cMsg: msgBody + "\n\nRegards\n" + Sender,
cSubmitAs: "PDF"});
What will be the addition for a pop up mesage (Please copy Jack London on the Requisition email), in case a numeric field(requires 9 digits) starts with 202?
Thanks
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies