1

Currently I'm trying to implement an overview of the human body where the user can click on multiple regions and add them to a list - this all works fine.
Now I want to use David Lynchs jQuery-plugin "maphilight" to visually make the hotspots visible, but it's simply not working, it`s just doing nothing.
Here's my ImageMap:

<div class="col-md-4">
    <asp:ImageMap ID="woundlocalisation_map" runat="server" HotSpotMode="PostBack" ImageUrl="~/Images_wndmgmt/wundlocal.jpg"  Width="400" Height="300" OnClick="woundlocalisation_map_Click" CssClass="body">

        <asp:RectangleHotSpot Left="55" Right="85" Bottom="52" Top="15" 
            HotSpotMode="PostBack" PostBackValue="gesicht"/>
        <asp:RectangleHotSpot Left="55" Right="80" Bottom="105" Top="65" 
            HotSpotMode="PostBack" PostBackValue="brust"/>
        <asp:RectangleHotSpot Left="35" Right="45" Bottom="105" Top="80" 
            HotSpotMode="PostBack" PostBackValue="oberarmRechts"/>
        <asp:RectangleHotSpot Left="90" Right="105" Bottom="105" Top="80" 
            HotSpotMode="PostBack" PostBackValue="oberarmLinks"/>
        <asp:RectangleHotSpot Left="25" Right="40" Bottom="145" Top="110" 
            HotSpotMode="PostBack" PostBackValue="unterarmRechts"/>
        <asp:RectangleHotSpot Left="100" Right="115" Bottom="150" Top="110" 
            HotSpotMode="PostBack" PostBackValue="unterarmLinks"/>
        <asp:RectangleHotSpot Left="15" Right="35" Bottom="175" Top="155" 
            HotSpotMode="PostBack" PostBackValue="vorderhandRechts"/>
        <asp:RectangleHotSpot Left="102" Right="122" Bottom="180" Top="155" 
            HotSpotMode="PostBack" PostBackValue="vorderhandLinks" />

    </asp:ImageMap> 
</div>

Now my Javscript looks like this:

$(function highlight () {
    $('.body').maphilight({ alwaysOn: true, fade: false, fillOpacity: 0.3 });
});

I tried to load it before/after the image loads, I tried to set it to document-ready and I tried to register it in code-behind via ClientScriptManager:

 ScriptManager.RegisterClientScriptBlock(this.Page, GetType(), "highlightMap", "highlight();", true);

I don't know why the script isn`t executed, the path to the src-file is correct - does everyone know if it's working with updatepanels? Could that be the reason its not working?

croxy
  • 4,082
  • 9
  • 28
  • 46
Max Kirsch
  • 441
  • 5
  • 24

0 Answers0