samobellows
Programmer
hello all!
i am having a cross browser compatibility issue i was hoping i could get some new eyes on. i've been trying to get this working for a while now, and i'm starting to glaze over.
i have a web form that the user fills out. based on what they selected, a different print page is generated, and put in to an iframe that functions like a print preview. this iframe is in it's own div, after the div with the form in it, and i use javascript to move it centered over the form, and on top of the form. the user then clicks the print button on the parent page to print the page.
i use a media="print" CSS document, so that when the page prints, the div with the form in it is hidden, and the div with the iframe in it is positioned at 0px,0px. it works like a charm in IE, however, in firefox and google chrome, nothing prints on the page, but the browsers default header.
here is my CSS media="print" stylesheet
the onclick event triggered by the print button is just window.print();
i dont know what it is about this code that makes IE happy, but not firefox or chrome. any fresh views on this would be greatly appreciated. thanks so much!
Sam
i am having a cross browser compatibility issue i was hoping i could get some new eyes on. i've been trying to get this working for a while now, and i'm starting to glaze over.
i have a web form that the user fills out. based on what they selected, a different print page is generated, and put in to an iframe that functions like a print preview. this iframe is in it's own div, after the div with the form in it, and i use javascript to move it centered over the form, and on top of the form. the user then clicks the print button on the parent page to print the page.
i use a media="print" CSS document, so that when the page prints, the div with the form in it is hidden, and the div with the iframe in it is positioned at 0px,0px. it works like a charm in IE, however, in firefox and google chrome, nothing prints on the page, but the browsers default header.
here is my CSS media="print" stylesheet
Code:
#PrintDiv
{
position:absolute;
top:0px;
left:0px;
visibility:visible;
}
#onscreendiv
{
visibility:hidden;
display:none;
}
the onclick event triggered by the print button is just window.print();
i dont know what it is about this code that makes IE happy, but not firefox or chrome. any fresh views on this would be greatly appreciated. thanks so much!
Sam