eBook authors eBook Software - create and publish your own ebooks
Create your own eBooks
Learn How To Create, Publish & Market E-Books
E-Book Creation Software
Add sophisticated multimedia to your E-Books
Create E-Book covers in minutes
E-Book Marketing & Promotion made easy
Search engine for E-Books
Interviews with eBook authors
Tools for building better eBooks
Archived Message:

Zoom in and zoom out

Alaska The forum was getting rather boring lately, so I thought I'd post some interesting JavaScripts that take advantage of Activ's IE components: the Zoom In and Zoom Out functions available in I.E. 5.5 +.

The Zoom function works in ebooks and htmlhelp files (help files with the .chm extension) just as well as web pages.   Animations, links and embedded objects, such as Java applets, still work at any zoomed resolution.  Print the page, and it prints in the zoomed resolution.

Here are the JavaScript functions, followed by the button markup that calls the Zoom() functions.

<script language="JavaScript" type="text/javascript">
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// © Copperfield Publishing  (www.copperfieldpub.com)
// This copyright notice must stay intact if using this script
// Zoom in & Zoom out
function zoomin(){
function zoomout(){
function zoomrest(){


Here is the code to create buttons that evoke the three zoom functions:
<input type="button" value="Zoom +" ONCLICK="zoomin();">
<input type="button"  value="Zoom -" ONCLICK="zoomout();">
<input type="button" class="butzoom" value="Restore" ONCLICK="zoomrest();">

You can evoke the function now, just by entering this into your IE address bar, and hitting <Enter>.
Refresh will return your page to normal:

--------copy and paste this into your address bar:
javascript: (function(){ function zoomout(){if(window.parent.document.body.style.zoom!=0) window.parent.document.body.style.zoom*=0.8; else window.parent.document.body.style.zoom=0.8;}zoomout();})();
-------end copy and paste

Further, you can create buttons in your IE browser with the ZOOM commands, ready to use on any page you visit.

Details on adding it to your browser links toolbar are posted here:


best -

roger nilsson
Copperfield Publishing
Team MacroMedia
eHelp MVP

(Edited by Alaska at 11:46 pm on Aug. 27, 2004)

Posted on: 8:42 pm on August 27, 2004
Storyman Alaska,

Great idea! Sunil should create a forum just for this kind of thing.

Posted on: 5:06 am on August 31, 2004

List All Archived Forums

Copyright © 2000-2018, Answers 2000 Limited.

With any business, it is up to the individual owner of said business to ensure the success of the business. You may make more or less than any sample figures or results that might be quoted on our web sites or other publications. All business involves risk, and many businesses do not succeed. Further, Answers 2000 Limited does NOT represent that any particular individual or business is typical, or that any results or experiences achieved by any particular individual/business is necessarily typical.

Disclosure: Our company's websites' content (including this website's content) includes advertisements for our own company's websites, products, and services, and for other organization's websites, products, and services. In the case of links to other organization's websites, our company may receive a payment, (1) if you purchase products or services, or (2) if you sign-up for third party offers, after following links from this website. Unless specifically otherwise stated, information about other organization's products and services, is based on information provided by that organization, the product/service vendor, and/or publicly available information - and should not be taken to mean that we have used the product/service in question. Additionally, our company's websites contain some adverts which we are paid to display, but whose content is not selected by us, such as Google AdSense ads. For more detailed information, please see Advertising/Endorsements Disclosures

Our sites use cookies, some of which may already be set on your computer. Use of our site constitutes consent for this. For details, please see Privacy.

Click privacy for information about our company's privacy, data collection and data retention policies, and your rights.

Contact Us    About and Terms Of Use    Privacy    Advertising/Endorsements Disclosures