I have implemented search by map function on my web-site. The map have some divisions that are clickable and send a value to the controller.
<form name="myform" action="index.php?option=com&task=seacrh_by_map" method="post">
<dd id="imgDI">
<a id="DI" href="javascript:getvalue('DI')"
</a>
</dd>
<dd id="imgDII">
<a id="DI" href="javascript:getvalue('DII')"
</a>
</dd>
<input type="hidden" name="my_value" value="" />
</form>
<script language="JavaScript" type="text/javascript">
<!--
function getvalue (my_value)
{
document.myform.my_value.value = my_value;
document.myform.submit() ;
}
-->
</script>
After sending this form, the controller gives an answer (results of search) and the map returns to its original position. Is there a way to prevent that? The map should show the division that was chosen. Is there a way to send a value to controller using js without map form refresh?