Validating the URL field in Adobe Forms using JavaScript

By Kalyan Balabhadrapatruni, YASH Technologies

In the Exit write the below JavaScript.  

if (this.rawValue != null )
{
var tomatch = /http:\/\/[A-Za-z0-9\.-]{3,}\.[A-Za-z]{3}/
var result = tomatch.test(this.rawValue);
if ( result == true)
true;
else
{
xfa.host.messageBox("Please enter a valid URL eg: http://www.Yash.com");
this.rawValue = null;
xfa.host.setFocus(this);
false;			// fail the validation.
}
}
Output:-
 
 

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image