Good night everyone.
I have an image of Brazil with its states:
HowdoI,ifIclickontheimageofthestateofSãoPaulo,fillinthisnameinatextfield.
<inputtype="text" name="uf" id="uf" value="">
Thank you in advance for your help.
In order to know where to click the best is to have an SVG that has elements for each region and JavaScript can know where the click occurred.
To caprat this you can do so, for example:
The structure of SVG ( SVG example copied from here ):
<g>
<a xlink:href="#tocantins">
... etc
and jQuery
$('svg a').on('click', function(e) {
e.preventDefault();
var id = this.getAttributeNS('http://www.w3.org/1999/xlink', 'href').slice(1);
$('input').val(id);
});