Actually I am using the following code for closing my current window:
window.close()
The thing is, it is working fine in IE, but it is not
You may have to call window.focus() before calling window.close() in Firefox