How to color asp access points on an imagemap card?

I have an image (the image is a floor plan of the building), and the image contains various rooms that can be open or reserved. I used the Imagemap map and hotspots to display the coordinates of the rooms, and I process onclick events to do what I need to complete them. The problem is, how can I color the coordinates of the access point when the room is reserved? I keep track of the reserved numbers in my database, so it’s not a problem knowing which room is reserved, but the problem is that there is no color property for hot spots. What is the best way to do this? Javascript

I know that I can change images per click and much more, but there are hundreds of rooms, and it would be a waste of time to have many images for every possibility of reserved / not reserved numbers.

+5
source share
2 answers

You do not say jQuery, but it will be easier than starting from scratch. jQuery for this:

http://www.outsharked.com/imagemapster/

The problem with access to the database is a little red herring. There is no reason why the server cannot transmit the data needed as part of the markup when loading the page, for example.

<script type="application/json" id="map-data">
  [1,2,10,33]
</script>

.. - // . script - div, . JSON, . ImageMapster, . , , - , .

ImageMapster:

http://jsfiddle.net/jamietre/hD6bM/

+2

HTML5 canvas

0

All Articles