Solved

link to File/Pagesetup

Posted on 2006-11-13
10
139 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Internet explorer web page rendering issues. 5 536
Update 2 tables at the same time 3 469
Dreamweaver CS6 Sites Setup 2 438
Dreamweaver - SQL Server Connetion/Connection String 5 981
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

739 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