What it is supposed to do is to shift the focus to the 2nd text input when a right click is done on the first one. This works fine in browsers on Windows, but in RHEL5, while checking in Firefox, this doesn't happen, and the focus still remains on the first one.

It still doesn't work. However, if I change the last code to if (e.which == 1)..., the focus gets shifted on clicking, it doesn't for right click somehow. This problem is happening in RHEL5 for Firefox, and Firefox, Chrome in Mac. It however, works fine in Safari and Opera on Mac.