I have created a sample for you.You can download the PDF from here and
see the javascript code written on exit event of the two text
fields.https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B8KcjZtz1YzXNDVmMmQ0YTUtMTJmYi00Yzk2LWIwZTctYWJmMjgwYTlkZGUw&hl=enNith