Thread: image map to text
Results 1 to 3 of 3
Related
-
Text vs image of text for logo - best practices Forum: HTML Forum
Replies: 1 -
Align text with an image link? Forum: HTML Forum
Replies: 2 -
Image to Text Rollover Forum: Website Scripts Forum
Replies: 0 -
thumbnail to image and text rollover Forum: Javascript Forum
Replies: 0 -
Aligning Text to an image ... Forum: CSS Forum
Replies: 4
-
11-14-2003, 04:53 PM #1
image map to text
I have an image map of the US and Canada. When a user clicks on a state or province I want the name of the state or province they clicked on to appear in a text box.
How do I do this?
-
11-15-2003, 09:27 AM #2
Originally Posted by STL
-
11-17-2003, 05:12 PM #3bald headed old fart
Status- Offline
Join Date- Aug 2003
Location- chertsey, a small town 25 miles south west of london, england.
Posts- 739
Hi there STL,
I have put this together using a table,
rather than a text area. I hope that it
may prove of assistance to your cause
Code:<html> <head> <title>U.S.A. States</title> <style type="text/css"> <!-- table { position:absolute; top:50px; left:380px; border: double 6px #ff0000; width:200px; height:100px; } td#one { font-family:arial; font-size:18px; color:#ffffff; text-align:center; background-color:#000080; } //--> </style> <script type="text/javascript"> <!-- function display_states(n) { states=new Array('Alabama','Arizona','Arkansas','California','Carolina','Colorado'); document.getElementById('one').innerHTML=states[n]; } //--> </script> </head> <body> <img src="USA.gif"width="300"height="200"border="0" alt="United States of America" usemap="#us_states"> <map name="us_states"> <area shape="rect" coords="0, 0, 49, 200" href="#"onclick="display_states(0);" alt="Alabama"> <area shape="rect" coords="50, 0, 99, 200" href="#"onclick="display_states(1);" alt="Arizona"> <area shape="rect" coords="100, 0, 149, 200" href="#"onclick="display_states(2);" alt="Arkansas"> <area shape="rect" coords="150, 0, 199, 200" href="#"onclick="display_states(3);" alt="California"> <area shape="rect" coords="200, 0, 249, 200" href="#"onclick="display_states(4);" alt="Carolina"> <area shape="rect" coords="250, 0, 299, 200" href="#"onclick="display_states(5);" alt="Colorado"> </map> <table ><tr><td id="one" ></td ></tr></table> </body> </html>
Of course, I have left you the task of inserting the rest of the states
cthead
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum