This is a migrated thread and some comments may be shown as answers.

window onmouseover

3 Answers 125 Views
Window
This is a migrated thread and some comments may be shown as answers.
Nik
Top achievements
Rank 1
Nik asked on 21 Jul 2010, 04:46 PM
Can I get some assistance with getting a radwindow to pop-up like a tooltip on mouseover of an element? I'm a little confused as to how to start it. The window also needs to have pre-defined text instead of loading a separate page into the window.

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 22 Jul 2010, 07:53 AM
Hello,

I am not sure about your scenario, but you can use client method to open the RadWindow in the onmouseover event of the element. The following documentation shows how to open window from client side.
Opening Windows

And you can use the <ContentTemplate> section of RadWindow to place predefined text in window.


-Shinu.
0
Nik
Top achievements
Rank 1
answered on 22 Jul 2010, 12:34 PM
I managed to get the window to open, but getting it to close onmouseout isn't working. Using the same close code I've used before, but it throws a JS error saying object required. An alert showed it did get into the close function, but not into the if statement. ideas?

if (window.frameElement) {
        GetRadWindow().close();
    }
0
Shinu
Top achievements
Rank 2
answered on 23 Jul 2010, 02:43 PM
Hello,

Check out the following code snippet which shows how to open/close RadWindow in 'OnMouseOver'/'OnMouseOut' event of RadTextBox. I hope you will find it very useful.

ASPX:
<telerik:RadWindow ID="RadWindow1" runat="server">
  <ContentTemplate>
      <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
  </ContentTemplate>
</telerik:RadWindow>
<telerik:RadTextBox ID="RadTextBox1" runat="server">
     <ClientEvents OnMouseOver="OnMouseOver" OnMouseOut="OnMouseOut" />
</telerik:RadTextBox>

Java Script:
<script type="text/javascript">
    function OnMouseOver() {
        var oWnd = $find("<%=RadWindow1.ClientID%>");
        oWnd.show();
    }
    function OnMouseOut() {
        var oWnd = $find("<%=RadWindow1.ClientID%>");
        oWnd.close();
    }
</script>

Regards,
Shinu.
Tags
Window
Asked by
Nik
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Nik
Top achievements
Rank 1
Share this question
or