Two things .....1 - x and y are reserved words in XFA and are used for
the coordinate positions for objects hence you cannot use them as var
names. I changed them to x1 and y1 and it worked.2 - to display a
message you would use app.alert with the same parameters not just
alertYou can see any javascript errors in the javascript console
(ctrl-J) using Acrobat.Paul