homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Setting Page Layout using JavaScript
Setting Page Layout using JavaScript

 11:44 pm on Mar 1, 2002 (gmt 0)

I want to provide print facility on a HTML page. The page contains a button to print. Whan the user clicks this button, depending on the length of the content, I want to change the page orientation from portait to landscape automatically and then print. Can I do this just using JavaScript only???



 12:11 am on Mar 2, 2002 (gmt 0)

Welcome to the forums.

We were talking about that in January on another thread. No one's come up with anything. I suspect the answer is you can't do it.



 11:30 pm on Mar 2, 2002 (gmt 0)

This could be a nuisance to the user, but I don't think a web page can modify the preferences of the browser itself. Although it is possible to set a favorite with code and to adjust some of the preferences.....

My app requires the user to print from the browser as well, and I got around it by offering an alert reminding them to set margins, etc. before printing. You'd need to set a cookie so they see it only once or twice per session or it could get annoying.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved