I have an image that when clicked, opens in a new window displaying the larger image and a print button. The issue I am having is that the new window only displays the first html element in IE7 nad IE8. Switching the order of the syntax proves this. Is document.write() incorrect for this type of situation?
<script type="text/javascript">
function openWin()
{
var myWindow=window.open('','','width=855,height=885,scrollbars=yes,toolbar=yes');
myWindow.document.write("<img src='/sites/default/files/PipelineChart_2012_large.jpg' height='785' width='835' style='float:left;' '/><input type='button' onClick='window.print()' value='PRINT'style='float:left; clear:both;'/>");
}
</script>
You have an extra quote before the closing
/>on your img tag in your document.write call: