Results 1 to 3 of 3
  1. #1

    Can anyone send the codes to change my print preference to landscape

    Hi Friends,
    Can anyone send me the scripts to change my print preference to landscape programmatically(using javascript) , it's urgent.

    Thanks in Advance.
    Kiran Kumar Panda

  2. #2
    Administrator Dave's Avatar
    Join Date
    Sep 2004
    Location
    Te Awamutu, New Zealand
    Posts
    3,959
    Blog Entries
    79
    There is no safe or consistent way to do this. The standard response to your question is "forget it" but here are a couple of links if you are determined to try:

    http://msdn2.microsoft.com/en-us/library/ms976105.aspx
    http://www.meadroid.com/scriptx/index.asp
    Dave Owen
    MediaCollege.com

  3. #3
    dear friend;

    instead of writing down your fictitious script, here is a piece of master's advice:

    { assuming you have your whatever content between <body></body> elements, which constitutes the "body section" of your supposedly well-formed html document }

    • put all your stuff into an HTML DIVISION
    • insert another HTML DIVISION before that DIVISION
    • fill in this new DIVISION with your landscape picture using HTML IMAGE declaration
    • by use of CSS Hacks pull your main DIVISION onto the first DIVISION, which is your landscape
    • do your print(*) whatever


    let me get more precise in css hacks:
    HTML Code:
    <head>
    	<title>example on what I mean</title>
    	<style>
    		div.container {margin:0px;padding:0px;width:500px;height:400px}
    		div.stuff {margin-top:-400px;padding:1.5em}
    		div.stuff h1 {margin:0;color:#00f;text-align:right;font:bold 1.2em Trebuchet MS}
    		div.stuff h2 {margin:0;font-family:sans-serif;text-align:right;border-bottom:1px solid red}
    		div.stuff p {font:300 .8em tahoma;text-align:justify}
    		div.stuff	ul {margin:140px 0 0 20px}
    		div.stuff ul li {margin:0.3em 0}
    		div.stuff ul li a,div.stuff ul li a:visited {padding:.25em;font:1.2em cursive;text-decoration:none}
    		div.stuff ul li a:hover {background-color:orangered;color:white}
    	</style>
    </head>
    <body>
    <div class="container">
      <img src="http://www.teawamutu.co.nz/local-info/history/y2k/images/hill01.jpg" alt="great te awamutu :-)" width="500" height="400" />
    	<div class="stuff">
    	   <h1>te awamutu</h1>
    	   <h2>welcomes you!</h2>
    	   <p>
    	   	Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In mi. Morbi urna purus, vehicula quis, congue sit amet, facilisis non, nisi. Aliquam erat volutpat. Nulla commodo fringilla dolor.
    	  </p>
    	  <ul>
    	  	<li><a href="">municipality</a></li>
    	  	<li><a href="">neighborhood</a></li>
    	  	<li><a href="">F.C. Awamutu United :-)</a></li>
    	  </ul>
    	</div>
    </div>
    </body>
    I'd advice you to forget looking for weird snipplets, instead, try to develop ways that reaches thy primary goal.

    best regards;
    Last edited by kunter; 31st Jul 2007 at 00:56. Reason: bad grammar :)
    - kunter ilalan web designer
    follow him on twitter and on MediaCollege

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Subscribe to us on YouTube