Tuesday, March 28, 2006

IFRAME Roger Rabbit

Let me save some lucky randomly-visiting developer a ton of time: If you ever have to open a pop-up window from within an iframe, make sure you call it using onClick (not by href) or Internet Explorer won't open it. IE will open it in the iframe or (sometimes) not at all. Either way seems to work in Firefox. In summary: INCORRECT: <a href="javascript:window.open('http://www.flawlesswalrus.com', 'newWin', 'width=300')">Click to pop</a> CORRECT: <a href="void();" onclick="window.open('http://www.flawlesswalrus.com', 'newWin', 'width=300')">Click to pop</a>

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home