Bah, this stuff drives me nuts. I have a link wrapping and image and caption inside a div. The link uses window.open() to open a slideshow in a popup window. Here's the code...
Don't ask me about that stupid br tag before the caption span... I added that to get the caption under the div in IE, something else that drove me nuts. Probably there's a better way.
The real problem is the behavior of the window.open() call. On Chrome it works exactly as it should. Click the link and the popup opens with the slideshow. On IE9 and Firefox it first opens a blank white window with the word [object] (Firefox) or [object window] (IE) at the upper left, and then pops the slideshow window over that. I can't figure out why that would happen. Anyone have any clues?
Code:
<a href="javascript:window.open('/slideshows/blahblah','slides','width=850,height=700,toolbar=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0')">
<div style="margin-left:25%; margin-right:25%;">
<img src="http://www.markbetz.net/wp-content/gallery/miscellaneous-article-graphics/link_image.jpg" />
<br />
<span style="margin-left:50px;">Click here to launch the slideshow</span>
</div>
</a>
Don't ask me about that stupid br tag before the caption span... I added that to get the caption under the div in IE, something else that drove me nuts. Probably there's a better way.
The real problem is the behavior of the window.open() call. On Chrome it works exactly as it should. Click the link and the popup opens with the slideshow. On IE9 and Firefox it first opens a blank white window with the word [object] (Firefox) or [object window] (IE) at the upper left, and then pops the slideshow window over that. I can't figure out why that would happen. Anyone have any clues?