3 ms·
The <input type="image"> isn't just an image, it actually inputs data too. It tells the server the coordinates on the image where your click occurred. Everybod
by destructionator 11y ago
The <input type="image"> isn't just an image, it actually inputs data too. It tells the server the coordinates on the image where your click occurred.
Everybody seems to think they are just for decorating submit buttons, but that's not true - their primary purpose is telling those coordinates of the click!
- yoha 11y agoI was really surprised by this so I had to check by myself. This is true! And I never learned that all the time I roamed the Internet. Thanks for spreading arcane knowledge!
- junto 11y agoYou obviously never had the misfortune to deal with image maps - the Ramsey Bolton Bastard brother of Flash. :-)
- MichaelGG 11y agoThey were very popular before that. I recall finding great use for them around 97. Easiest way to have complicated graphical navigation.
- junto 11y agoAll was find until you had to define clickable areas as polygons. Urrrrgh.
- snowwrestler 11y agoImage maps were the best. We could have a clickable map of the U.S. that was fast-loading, cross-browser compatible, and did not require a plugin. What's not to like? Today the way to do that is with javascript libraries like D3.js, which handle both drawing the map and detecting/directing clicks. That was not an option 8 years ago; javascript was too slow.
- krapp 11y agoImagemaps were fun ages ago - and animating imagemap menus with javascript was even more fun. No one would bother with such things today when CSS has animation and whatnot.
- yoha 11y agoI actually did, but only with <map>, never <input type=image>.
- leesalminen 11y agoI may or may not have used this in 2007 on a map of the counties of NY state. Perhaps a decade later than I should've, but it works well to this day!