MouseOver on AJAX ModalPopupExtender - ASP.Net

I want to enable a ModalPopupExtender on mouseover on a text. I can do that using  TargetControlID(when text click) but have no idea on mouseover. I'm using Asp.Net
jr_bautistaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

 
aibusinesssolutionsCommented:
You would need the following javascript:

function ShowMyModalPopup() {
      var modal = $object('modalPopUpID');
      if (modal) {
        modal._show();
      }
   }

And then on the button or text, or link, just put OnClick="ShowMyModalPopup()"...

Remember if it's an ASP.NET control you will need to use OnClientClick=
0
 
CB_ThirumalaiCommented:
For mouseover, you can add do this.  For example, if it is a label control then, add an attribute to be fired on the client side on the label control
        <asp:Label ID="lblText" runat="server" Text="Something"/>
in the server side as,
       lblText.Attributes.Add("onmouseover", "functionname();");
0

Experts Exchange Solution brought to you by ConnectWise

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
jr_bautistaAuthor Commented:
thanks for all your solutions, can't make it run - I attached the code snippet except the Panel. I used both $find and $object

Button Event:
<asp:ImageButton ID="detail" runat="server"  onmouseover="showModalPopupViaClient(this)"  />
 
Extender:
<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" 
            TargetControlID="job1" PopupControlID="pnlPopup1"  CancelControlID="btnCancel" 
            OkControlID="btnOK" BackgroundCssClass ="modalBackground">            
             </cc1:ModalPopupExtender> 
 
<cc1:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server" 
           TargetControlID="pnlInnerPopup1" BorderColor="white" Radius="10" />        
 
Javascript:
 
<script language="javascript" type="text/javascript"> 
  function showModalPopupViaClient(control,id) {                 
            var modalPopupBehavior = $find('ModalPopupExtender1');
            modalPopupBehavior.show();                    
              
        }
 
</script>

Open in new window

0
 
aibusinesssolutionsCommented:
I think the function is _show(), not show()
0
 
jr_bautistaAuthor Commented:
I got it! Since my page is in master page I added the ctl00_ContentPlaceHolder1_ to find it.

Thank you all...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.