Forum Moderators: travelin cat

Message Too Old, No Replies

Javascript print() on Mac

         

gsdutt

1:27 pm on Mar 24, 2003 (gmt 0)

10+ Year Member



Hi,
I am trying to use javascript on mac. But, I get an error as to, object not found. This works on all browsers on windows. I was wondering if there is anything specific I would have to do, to make it work on Mac.

I have 2 frames, the top frame has the content and the bottom one has a button to print the top frame. The code I am using is, parent.frames[0].print();

Thanks in advance.

GS

Macguru

1:51 pm on Mar 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi gsdutt,

I guess you are talking about IE 5 for Mac?

One of the numerous problems with IE 5 for the Mac is that the Print command only prints the active frame. I dont know of anyway to fix this (hope someone does). Did you try it on another Mac browser?

gsdutt

2:19 pm on Mar 24, 2003 (gmt 0)

10+ Year Member



Hello,

I have not tried it on any other browser. But, will try. Is there anyway to get around this?

Macguru

10:07 pm on Mar 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Err...

Not to use frames?

Please give us more details on why you need to use them. This detail can be important.

Hope you get some solution, soon.

gsdutt

10:19 pm on Mar 24, 2003 (gmt 0)

10+ Year Member



Hi,

Yes, I would need to use frames, cause I am pulling the content from the main site. This pop-up page is like printer friendly version of the main page. The top frame being the content of the page and the bottom frame a print button.

Once the button is clicked, I print the top frame(presently using parent.frames[0].print()).

Thanks,

GS

jatar_k

11:25 pm on Mar 24, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You could always use a little php/perl, open the page you need to show, remove the </body></html> from the end of the page and insert your print button and then put back the </body></html> and then diplay the page. You wouldn't need to use frames that way.

I don't think you are going to make it work with the frames/printing bug otherwise.

I understand the frames are necessary but then why IE 5? why Mac?(not starting anything, I love Mac) why print link? It would seem to me that a work around would be the only solution. Otherwise one of the "essential" criteria has to give.