image zoom ability

Discussion in 'HTML & Website Design' started by okoolo, Aug 20, 2009.

  1. #1
    When I open a very large image in a new window using a standard hreft form
    <a href="img/mc6_big.JPG"> <img src="img/mc6.jpg" alt=""/>

    a "zoom mouse" appears which lets the user zoom in or out and the image is
    originally zoomed out to fit in the new window

    What I'd like to do is keep that "zoom" ability and add controls(buttons) to for example close the new page.

    When I open the image using javascript, something like:
    OpenWindow.document.write("<IMG SRC=" + picURL + ">")
    I can add a button:
    OpenWindow.document.write("<INPUT TYPE='BUTTON' VALUE='Close Window' onClick='window.close()'>")

    but the zooming ability does not appear

    Is there a way to add a button when an image is opened and at the same time keep the default behaviour of zoomed image?

    I guess I should mention that I'm a beginner..

    thanks
     
    okoolo, Aug 20, 2009 IP