Solved

link to File/Pagesetup

Posted on 2006-11-13
10
140 Views
Last Modified: 2010-04-25
By the inclusion of the following tag I can go directly to the print routine

<a href="#" onClick="window.self.print(); return false;">Print</a>

Is it possible to go to File > Page Setup instead?

I tried <a href="#" onClick="window.self.setup(); return false;">Print</a>
and
<a href="#" onClick="window.self.pagesetup(); return false;">Print</a>

without success.

Any ideas please?
0
Comment
Question by:johnhardy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 3
10 Comments
 
LVL 25

Accepted Solution

by:
Rouchie earned 200 total points
ID: 17931997
No it is not possible unfortunately, and is a very commonly asked question.  If you were hoping to open the Page Setup window because the current design doesn't print very well, then the recommended approach is to use a second print-based style sheet to automatically make the page print differently to how it displays on screen.

This is one of the most popular articles on the internet that provides more of an insight: http://www.alistapart.com/stories/goingtoprint/
0
 

Author Comment

by:johnhardy
ID: 17932553
Thanks I will have a good ;look through that, looks very interesting.

I just wanted to allow a quick change of headers and footers.
0
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 200 total points
ID: 17933154
Hi John,

>> I just wanted to allow a quick change of headers and footers.

Definitely follow Rouchie's advice and use a secondary stylesheet for print view.  You can either embed a second call to a print only stylesheet:

<link href="../printstyle.css" rel="stylesheet" type="text/css" media="print">

or you can add a print definition to your existing stylesheet:

@media screen {

your styles

}

@media print {

your styles

}

I personally recommend using the latter solution.  It keeps your list of files more organized and if an element is supposed to look the same on screen and printed, you just place it outside of the @media calls and it becomes a global style.  When you edit pages in DW, use the View | Style Rendering to flip between the renders and edit the appropriate CSS blocks.
0
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

 

Author Comment

by:johnhardy
ID: 17933500
Thanks,

I will come back to this soon

John
0
 
LVL 25

Expert Comment

by:Rouchie
ID: 17936338
Good follow-up Jason.  Not entirely sure why I didn't engage brain to provide an example...!  8-|
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 17940114
Rouchie,

No worries.  You've done that enough times to me when I provide an answer that needs clarification :)
0
 

Author Comment

by:johnhardy
ID: 17946408
Thanks very much for the help.

I am getting there OK gradually.

I didnt understand Jasons @media screen answer and dont have the time right now to persue this.

Anyway Thanks again John
0
 
LVL 25

Expert Comment

by:Rouchie
ID: 17946746
Although I don't use this approach, I believe this means

@media screen {
  h1 {font-size:20pt; color:#ff0000;}
}

@media print {
  h1 {font-size:12pt; color:#0000ff;}
}

that the above code will print H1 headers in blue, but display them in red on the screen, with different font sizes too.  It allows you to specify BOTH sets of appearances in the same style sheet.

My approach is to create 2 stylesheets, one for screen and one for print.   They each contain the same style names but with different formatting for each.  I link both sheets in as follows (again borrowing from Jason's answer)...

<link href="../printstyle.css" rel="stylesheet" type="text/css" media="print" />
<link href="../screen.css" rel="stylesheet" type="text/css" media="screen" />
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 17949295
John,

Rouchie explains my answer correctly.

There isn't a whole lot of difference between the two solutions.  I just prefer to have one file instead of two (or three, if I'm also designing for a handheld) whenever possible.

Thanks for the assist.

J
0
 

Author Comment

by:johnhardy
ID: 17950723
Thanks for the further help, promise I will work on it!
Cheers
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question