Greets!
I'm a noob struggling to learn html and javascript - getting there slowly. I'm trying to print a DIV served up by SimpleModal. The page is at:
www.planetsarsfield.com
This "Print" function is in the recipe box at the bottom. Everything works great in FF, but it doesn't work at all in IE8. I must be doing something fundamentally wrong but I can't spot it.
Any ideas?
Cheers, TY ++++++++++++++++++++++++++++++++++++++++++++++++
<script type="text/javascript">
function PrintElem(elem)
{
Popup($(elem).html());
}
function Popup(data)
{
var mywindow = window.open('', 'basic-modal-content', 'height=400,width=600');
mywindow.document.write('<html><head><title>on the grill... latest recipe</title>');
mywindow.document.write('<link href="PATH/print.css" rel="stylesheet" type="text/css" />')
mywindow.document.write('</head><body >');
mywindow.document.write(data);
mywindow.document.write('</body></html>');
mywindow.document.close();
mywindow.print();
return true;
}
</script>