0
I have an image of the human dental arch. I want to display it and when clicked on a given tooth, the value was filling in an input text field.
Example:
[13,12,11]
The image I’m going to use is this:
The idea is to click on tooth 11, 12 and 13 your values be filled in the form field to be inserted in the bank.
I believe this is with javascript, but I’m lost in it. Could you help me?
Welcome to sopt. What have you tried to do? It would be interesting to post a [mcve]. So it is easier to guide you.
– user28595
That image will always be the same or you’ll get different images for each patient?
– Sergio
@Diegof have no idea how to start.
– MaryFlores
@Sergio will be the same image yes.
– MaryFlores
I suggest you use something more practical. A SVG would be better. Something like this: https://jsfiddle.net/jkwj423z/ (with a lot of work it might be good).
– Sergio
@Sergio the idea is to click on a given tooth, example: 10 and another tooth, 31 ... when clicking on these two teeth, the values 10 and 31 were for an input text field of my form.
– MaryFlores
Well, I’ve managed to map the image using the tags below:
<img src="_Imagens/arcada.png" width="500" border="0" usemap="#Map" class="bordaimg" />
 
 <map name="Map" id="Map">
 
 <area shape="rect" coords="217,8,247,101" href="javascript:AQUI_O_JS('11','dentes_id');" title="Dente 11" /></map>
– MaryFlores
Now I’m breaking my head to make a JS that takes the value "11" and plays in the field inpu text with the ID "dentes_id".
– MaryFlores