I've created a simple function that should update a textfield based on an image map. For some reason this is not working and I can't find any problems with the code. If you can help out, please do.
The code is as follows:
Code:<html> <head> <title>Mapping Example</title> <script language="JavaScript" type="text/javascript"> function update(t) { document.form1.text1.value = t; } </script> </head> <body> <map name="map1> <area shape="rect" coords="0,0,100,100" onClick="update('left');"> <area shape="rect" coords="20,0,40,40" onClick="update('right');"> </map> <h1>Image map example</h1> <hr> <img src="mateintwo.jpg" usemap="#map1"> </hr> <form name="form1"> <input type="text" name="text1"> </form> </body> </html>




Reply With Quote