简体   繁体   中英

how will i onclick submit function on image map

i have this set of codes. if i click the Head the form will submit but it did not happen what should i do ?

 <form action="" name="form" method="post" name="myform" >

    <area shape="poly" class="noborder icolor00ff00"coords="114,29,122,30,1" onClick="this.form.submit();" name="Head"  value="Head"title="Head" alt="Head" />

    </form>

I am not sure this will work, but I think it would:

<form name="form" action="somefile.xxx" method="post>
...set up image, hidden input fields, etc....
<area shape="poly" class="noborder icolor00ff00" coords="55,143,58,159" nohref onClick="form.submit();" alt="Submit request">
</form>

one more answer

<form name="form" action="../cgi-bin/schools/d/s/csvsearch.pl" method="GET">
...set up image, hidden input fields, etc.... 
<img src="../images/california_counties_map2.jpg" width="700" height="803" border="0" usemap="#Map"> 
<map name="Map">
<area shape="rect" coords="213,46,290,104" alt="test" onClick="form.submit();" nohref>
</map>
</form>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM