Zoom in/out

wxdqz

New Member
hi everyone !
I'm trying to make this little script working...
It's an zooming script, for an page with several images, allowing the user to zoom in the page, making images bigger or smaller...

The probleme is that when the user zoom in, and then zoom out, it takes two click on the zoom out buton before it zomm out...

Help !!!!!

<HTML>
<HEAD>
<TITLE>Zoom Test...</TITLE>
<script language="javascript">

var SW

function Retab()
{
document.body.style.zoom = 1;
SW=1
}

function U()
{
alert(SW)
document.body.style.zoom = (SW+0.2);
SW=SW+1
}

function D()
{
alert(SW)
document.body.style.zoom = (SW-0.2);
SW=SW-1
}

</script>
</HEAD>
<BODY onload="Retab();">
<FORM name="Fm">
<CENTER>
<BR>
<Button onclick="U()">UP</Button>
<Button onclick="D()">Down</Button>
<BR><BR>
<Button onclick="alert(SW)">Combien</Button>
<Button onclick="Retab()">R&eacute;tablir....</Button>
<BR>


</CENTER>
</FORM>

</BODY>
</HTML>:confused: :confused:
 
Top