I am using two frames, in my first frame my "Print" button is there and from that button I want to print the another frame's document(HTML CSS). So for that I have written the following Function: function printReport() { parent.Main.focus();//"Main is my second Frame's name which I want to Print. window.print(); } The above function works well in IE but in netscape 6, nothing happens , it also doesn't give me any error message. If any one have any idea about my problem please respond.
Hello, Thanks for the quick response, but by using this function I am getting access denied arror. As my Print button in upper frame and the document which I want to print is lower one(i.e. main--Frame name).
Hello, As said by you that following code is working, although I have seen ur code also that is working fine. Actually in My second frame i.e. Main, I am generating Report in HTML CSS and that i want to be printed. In the following function it is not going beyond parent.Main.focus(). Could you please suggest me something regarding this. --------------------------------------- <script language="javascript"> function printReport() { alert("Before if condition"); if (window.print) { alert("After if condition"); parent.Main.focus(); alert("After focus----"); parent.Main.print(); alert("Over"); } } </script> ------------------------------------