window.onbeforeunload not working in dsp

Urgent…can anyone help me on this.
i want to make ajax call before closing browser tab but window.onbeforeunload not responding in dsp page.
so please tell me whether dsp supports window.onbeforeunload or not, because its working perfectly in Jsp.

well its working on IE but not in chrome.