I have done how to find out co ordinate(x and y axis) of a point on an image where a user clicks.
But I need the opposite thing now.
I need to mark a point on an image when a user gives suitable x axis and y axis co ordinate as input, how can i do this with java script?
Pls help


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <meta name="generator" content=
    "HTML Tidy for Windows (vers 25 March 2009), see www.w3.org">
    <script type="text/javascript">
    function setXY() {
        var oZ = document.getElementById('z')

        function setX(x) {
            oZ.style.left = isNaN(x) ? 0 : x % 100

        function setY(y) {
            oZ.style.top = isNaN(y) ? 0 : y % 100


    <div onclick="setXY()" style=
    "position:absolute; top:0; left:0; height:120px; width:110px; background-color:yellow">
    <div id='z' style="position:absolute; top:0; left:0">
      x: <input id='x' value='0'> y: <input id='y' value='0'>

is a toy example.

In the general case you need to adjust the origin of the x/y values to match the current location of the background image and scale both ranges to match its dimensions.