Welcome to WebmasterWorld Guest from 50.19.156.133

Forum Moderators: open

Message Too Old, No Replies

Setting Page Layout using JavaScript

Setting Page Layout using JavaScript

     

kmpudi

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

10+ Year Member



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???

tedster

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

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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.

Reference:
[webmasterworld.com...]

txbakers

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

WebmasterWorld Senior Member txbakers is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month