[Pro] Automatic print page not automatic?

Using a technique with extended dialog that Walter described on this forum, I created a secondary page to print only the map and directions you see on the referenced page. The secondary page opens through the built-in Link to New Window action.

Problem is, when the print button on the original page is clicked and opens the secondary, linked page, that page does not automatically print. I thought that was the point of adding the action. Am I missing something?

Also, why does my page link included her put that # after the html? It doesn’t show in the inspector pane for the page I created.

http://www.laurabelgrave.com/tester/location.html#


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If you want to make a special printable (and self-printing) page, this example is probably more complex than you need. So you have a page that is all set for printing – no background colors or images, high-contrast, small page size, vertical orientation – then all you need to do is open the Page/Extended dialog, click on New, and enter the following Name/Value pair:

  • onload
  • if(window.print) return window.print();

Note carefully that you would apply this only to the print-only page, not the page containing the link to that page. This code will booby-trap the page to instantly print itself the moment it is fully loaded. And as you are no doubt aware, this will only go so far as to present a Print dialog to the user, prompting her to click Okay, not actually fire up the printer and send the paper through it.

Now, back at your normal browser-friendly page, link to your print-friendly page from the Print button graphic, and for bonus points, use the Target: _blank scheme to open a new window. At the moment, the Print button links back to the same page it is on using a JavaScript link scheme, which is why you are seeing the # appended to the link.

The other way to handle this (preferable, in my opinion) is to create a print stylesheet that horses around the current map page into something more printable. Then your print button can have the following link applied to it:

javascript:window.print()

A print stylesheet will allow you to do all sorts of things that would normally require a separate page – remove elements like the print button itself, change the geometry of the page, font-size, color, substitute a different all-black map image, substitute a large and readable URL for the navigation, really anything you might want to print but not show the web visitor.

Walter

On Jun 9, 2013, at 12:00 PM, LauraB wrote:

Using a technique with extended dialog that Walter described on this forum, I created a secondary page to print only the map and directions you see on the referenced page. The secondary page opens through the built-in Link to New Window action.

Problem is, when the print button on the original page is clicked and opens the secondary, linked page, that page does not automatically print. I thought that was the point of adding the action. Am I missing something?

Also, why does my page link included her put that # after the html? It doesn’t show in the inspector pane for the page I created.

http://www.laurabelgrave.com/tester/location.html#


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Ah! Always another trick of the trade to learn, and my learning will never end. I shall give this a shot momentarily. Thank you!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Spoke too soon: What do you mean when you say “use the Target: _blank scheme to open a new window.” Where do I find that?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If you are using HTML 4 Transitional, XHTML 1.0 Transitional, or HTML5, you will find that in the Hyperlink dialog. You link to your print-only page, then choose Target: _blank in the bottom half of the Hyperlink dialog. If you are using a Strict DOCTYPE, then you won’t have that option (it will be grayed out).

Walter

On Jun 9, 2013, at 2:09 PM, LauraB wrote:

Spoke too soon: What do you mean when you say “use the Target: _blank scheme to open a new window.” Where do I find that?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks, Walter. Somehow I magically figured this one out in the interim. Head’s burned out today.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options