<SCRIPT>
function setClip(sOptionValue) {
oImage.style.clip="rect(0,"+sOptionValue+",100,0)";
if (oElmnt1.currentStyle.clipRight == "60px") {
alert("The image has been clipped to 60px.");
}
:
}
</SCRIPT>
:
<IMG ID=oImage SRC="/workshop/graphics/sphere.jpg">
:
Pick an amount to clip the right:
// the option value is sent as an argument:
<SELECT >
<OPTION VALUE=100>reset </OPTION>
<OPTION VALUE=40>40px </OPTION>
<OPTION VALUE=50>50px </OPTION>
<OPTION VALUE=60>60px </OPTION>
</SELECT>