View Full Version : Loading iframe prior to browser default

12-29-2010, 03:32 PM
Hi Guys,

I have an situation. An DIV has two sections, one to prompt user info and other displays ads. While the ads section is in an iframe(inside DIV) whose src is set dynamically, i.e. when user tries to close the browser, then my code brings up the DIV and sets the src of that iframe also an browsers default prompt stays on top of the page asking for 'Ok' and 'Cancel' button to leave/stay on the page respectively.

My problem is that the iframe is not loaded unless user clicks on the 'Cancel' button. This happens in IE,Chrome and Safari but works fine in Firefox. I know this is an browser's behavior but still expect an cross browser solution.