Good afternoon,
I am new to Javascript and have been living off this forum along with google for most of my script needs. It has been working out until I hit this snag.
I am trying to compare two fields. If they are the same send an alert saying they are and also clear them. Using this code.
if (getField("REF ADD").value == getField("REF2 ADD").value);
{
app.alert("The References cannot have the same address.\n\nPlease change the addresses.")
(getField("REF ADD").value = "")
(getField("REF2 ADD").value = "")
}
This action was placed the the custom validation area on the "REF2 ADD" field. It shows the Alert and clears the first, "REF ADD", field but not the second. Also it doesnt matter what is in the fields it always comes back true.
These two field are address fields, both alpha and numeric.
Any help is appreciated.
Thank you.
Don't put the getField commands in parentheses.
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com