window .open is not opening on page load in ie8

Hi unable to open window.open on page load in ie8 If I use window.location its not opening in new page please help me out of this.

Answers:

Answer

This is because you're running into the popup blocker. This is a Good Thing(tm) :-) You can only open popups in response to the user taking an explicit action, like clicking something (and then typically only from within the event handler itself), not on things like page load where the unwitting user could be (and historically has been) inundated with dozens of windows opening all over the place. (And even doing it in response to an explicit user action may not be allowed by some blockers.)

Answer

Are no-one seeing a big problem with running window.open(window.location.href,'_blank') in the onload handler?

This is systematically a recursive function which would continue until the user manages to close the new window prior to the onload handler running.

I'm not saying that this has anything to do with the problem it might just be that IE8 is clever enough to see this..

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.