Forum Moderators: mack

Message Too Old, No Replies

printing framesets problem....

         

tidydougal

2:26 pm on Feb 19, 2004 (gmt 0)

10+ Year Member



what keeps happening is that i create a frameset with all the attributes workin on screen, which includes a easy to use navigation bars so that the user doesnt get lost and can get round my sites with no trouble at all.... no probelms there!

the probelm arrises when you go to print a page that ISNT a recognised "open in frame" page, but a page which you get to by clickin on a button on the navigation bar with the target of "mainframe". When I go to print all I seem to get printing out is the navigation buttons and not the page intended!

if i have made any sence by what i have just said are there any ways that this small problem can be resolved, and is it something that has to be changed in the frameset properties? or is it a problem that im going to have to put up with?

PSilver

9:36 pm on Feb 19, 2004 (gmt 0)

10+ Year Member



If you click in the frame you want to print (or highlight a bit of text in it) the browser realises that's the one you want to print. The problem it's having at the moment is because the navigation frame where you clicked the link is the last one you interacted with, the browser thinks that's the one you're interested in and prints that.

Maybe one way around this is to put in a link on the page which uses Javascript to bring up the print window. I think it's something like:

javascript.window.print();

If you put that in a link instead of a page address, and have the link text 'print this page' that might make the browser recognise which of the frames you're trying to print.

Also, if you Google for "javascript print page" you'll see some code that will let you print one frame from another, so you could have your 'print this page' code as part of your navigation, but it'll print the main content frame that's showing at the time (I think.)

HTH

Paul