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).
Ashwani Yadav
Ranch Hand
Joined: May 23, 2002
Posts: 33
posted
0
Ya now print pop up is opened on call of this function but it prints only the upper frame where as i am giving name of lower frame to print.
Is this the way you are doing it too or almost to way? /Rene
Ashwani Yadav
Ranch Hand
Joined: May 23, 2002
Posts: 33
posted
0
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> ------------------------------------
Ashwani Yadav
Ranch Hand
Joined: May 23, 2002
Posts: 33
posted
0
The above witten function gives error "Access denied" when the frame which I am printing conatins HTML CSS document. Does any body knows abot this?