faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

3 of 6 people (50%) answered Yes
Recently 3 of 6 people (50%) answered Yes

Entry

How can I force a 640x480 image to 384x288 only when printing the page, using onbeforeprint?

Apr 5th, 2008 20:33
ha mo, Christoph Baresel, Bill Hooper,


Hi,
I've done it only in IE5.0:
function chgWinSize(width, height)
{
for ( var i = 0; i <  window.document.images.length ; i++)
{
  	 window.document.images[i].height = height;
          window.document.images[i].width = width;
}
}
With the event onbeforeprint you can resize it for printing.
With the event onafterprint you can resize it for displaying it in the
browser in the normal size.
Hope this helps!
Christoph
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com