My Javascript code is giving syntax error, I am unable to find where is the problem:
<script type="text/javascript">
function display(id,type){
alert("Hi");
}
</script>
onclick event is given below:
<map name="Map" id="Map">
<area shape="rect" coords="24,165,133,182" href="#" onclick="display("#td1","show")" />
<area shape="rect" coords="23,190,167,209" href="#" />
<area shape="rect" coords="23,218,165,235" href="#" />
<area shape="rect" coords="22,242,165,261" href="#" />
<area shape="rect" coords="23,268,164,286" href="#" />
</map>
onclick="javascript:display("#td1","show")". Check your quotes.onclick="display('#td1','show');""diplay(",#td1(which causes the syntax error),",",show, and")".tdhtml as well?