I am getting a popup when i am clicking on a field. this is where my script is breaking. I creating a new window event where i clicked destroy so that when that window appears it will destroy that window. I have used a whenever statement and used this event there. Still I am not able to succeed. help me to get rid of this.
Before the Whenever event fires in response to the popup, your script may try to execute the lines that follow the clicking on the field. That is probably why your script breaks.
If the popup appears each time after you click on the field, just destroy it. If it appears only sometimes, try rather the Wait event: wait for the popup window for a second or two and if it appears then destroy it. Otherwise continue with the rest of the script.
Do you always get a pop-up when clicking on the field? If so, then just capture the pop-up acknowledgement.
Never overlook the obvious. Using a "whenever" statement may be overkill. Look for the simple solution first.