Sunday, March 11, 2012

modalpopup and imagemap

Hi,

You can achieve it via javascript:


<asp:ImageMap ID="ImageMap1" runat="server" ImageUrl="~/Images/MS.JPG">
<asp:RectangleHotSpot Right="20" Top="20"NavigateUrl="javascript:showModal(0);"/>
</asp:ImageMap>

<script type="text/javascript">
function showModal(index)
{
var modal = $find("behaviorIDOfModal");
modal.show();
}
</script>


Thanks for this Wen. Can i possibly ask another question. What would be the way to refresh the parent window?

Thank you!

Ashwin


It depends on how do you plan to refresh the window.

You can set window.location = "current url" with javascript. Or you can fire click event on a button with javascript to refresh the window.

Please note the modal popup is actually a part of the window, it will be refreshed as well. And its state may not be maintained after a refresh.

No comments:

Post a Comment