www.webdeveloper.com
Results 1 to 4 of 4

Thread: Html maps

  1. #1
    Join Date
    Jul 2012
    Posts
    2

    Html maps

    hi.. i dont know how to color a map using onclick..

    example: when clicking a star image map it will change color, then when clicking it again it will go back to its original color..

    please share some ideas , thank you in advance

    my code is like this:

    <html>
    <head>
    <title></title>
    <head>
    <body>

    <img src="" usemap="">

    <map name="">
    <area shape="poly" coords="191,116,221,200,320,205,242,258,269,344,190,293,109,345,137,259,61,205,160,200,191,116" href=""/>
    <area shape="rect" coords="662,117,355,361" href=""/>
    <area shape="circle" coords="843,240,122" href=""/>
    </map>
    </body>
    </html>

  2. #2
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,214
    Maybe make 2 image map using same coordinates exactly then use Javascript to swap images. Example:

    http://www.irt.org/script/1609.htm

  3. #3
    Join Date
    May 2012
    Posts
    26
    Well you can do it with flash or with the use for java script there is no other way of doing this. Maybe there would be the possibility to do this type of image mapping in HTML 5.
    but the previous version of HTML will not able to do this without the help of java script.

  4. #4
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,214
    Quote Originally Posted by perfectionh View Post
    Well you can do it with flash or with the use for java script there is no other way of doing this. Maybe there would be the possibility to do this type of image mapping in HTML 5.
    but the previous version of HTML will not able to do this without the help of java script.
    I just gave another way to do this. A simple JavaScript image swap will work, but the image sizes and map coordinates would have to match very closely. Flash is not the way to go unless you can be sure people have the browser specific flash plugin to use. JS only has to be enabled in the browser to work and the "noscript" tags can warn viewers to do so.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles