OnMouseOver Help Box

Discussion in 'ASP .Net Web Controls' started by Morris Neuman, Jun 14, 2009.

  1. Hi,
    How do I set up a text field that when the user moves the mouse over this
    text, a message box shows with an explanation message and then disappears
    when the cursor is moved away? For example, if the displayed text is
    "CALLMaster 3.2 for PSTN" then when the the mouse is over PSTN, I would like
    to display a message box or graphic with explanation of PSTN.

    I am working with Expression web 2, in a .aspx page and used the Format
    Behaviour popUpMsg box to display the text. This box however requires the
    user to press OK to continue. I don't want the user to have to press ok.

    The text is defined as:
    <a "FP_popUpMsg('PSTN Test Message')" onmouseover="FP_popUpMsg('PSTN Test
    Message')">CALLMaster 3.2 for PSTN</a>

    The script is set-up as:
    <script type="text/javascript">
    <!--
    function FP_popUpMsg(msg) {//v1.0
    alert(msg);
    }
    // -->
    </script>

    --
    Thanks
    Morris
    Morris Neuman, Jun 14, 2009
    #1
    1. Advertising

  2. Hello Morris,

    Based on my understanding, you want to pop out a message panel to display
    the specific information about the text field in GridView when mouseover
    and hide it when mouseout. If I have misunderstood, please feel free to let
    me know.

    I think you can define ToolTip for the label in GridView to achieve it .
    Please check the following sample:

    <asp:GridView ID="GridView1" runat="server"
    AutoGenerateColumns="False" DataKeyNames="CityCount"
    DataSourceID="SqlDataSource1"
    OnRowDataBound="GridView1_RowDataBound">
    <Columns>
    <asp:TemplateField>
    <ItemTemplate>
    <asp:Label ID="Lable1" runat="server"
    Text='<%#Eval("link") %>' />
    </ItemTemplate>
    </asp:TemplateField>
    </Columns>
    </asp:GridView>


    protected void GridView1_RowDataBound(object sender,
    GridViewRowEventArgs e)
    {
    if (e.Row.RowType == DataControlRowType.DataRow)
    {
    Label la = ((Label)e.Row.Cells[0].Controls[1]);
    la.ToolTip = "description about "+la.Text;
    }
    }

    Then it will generate ToolTip for each Label control in GridView.
    Vince Xu [MSFT], Jun 15, 2009
    #2
    1. Advertising

  3. Thanks for the reply. However I want to provide this tip for regular text
    not in a GridView. Please see text example in my original request. Can that
    be done?
    --
    Thanks
    Morris


    "Vince Xu [MSFT]" wrote:

    > Hello Morris,
    >
    > Based on my understanding, you want to pop out a message panel to display
    > the specific information about the text field in GridView when mouseover
    > and hide it when mouseout. If I have misunderstood, please feel free to let
    > me know.
    >
    > I think you can define ToolTip for the label in GridView to achieve it .
    > Please check the following sample:
    >
    > <asp:GridView ID="GridView1" runat="server"
    > AutoGenerateColumns="False" DataKeyNames="CityCount"
    > DataSourceID="SqlDataSource1"
    > OnRowDataBound="GridView1_RowDataBound">
    > <Columns>
    > <asp:TemplateField>
    > <ItemTemplate>
    > <asp:Label ID="Lable1" runat="server"
    > Text='<%#Eval("link") %>' />
    > </ItemTemplate>
    > </asp:TemplateField>
    > </Columns>
    > </asp:GridView>
    >
    >
    > protected void GridView1_RowDataBound(object sender,
    > GridViewRowEventArgs e)
    > {
    > if (e.Row.RowType == DataControlRowType.DataRow)
    > {
    > Label la = ((Label)e.Row.Cells[0].Controls[1]);
    > la.ToolTip = "description about "+la.Text;
    > }
    > }
    >
    > Then it will generate ToolTip for each Label control in GridView.
    >
    >
    Morris Neuman, Jun 15, 2009
    #3
  4. Hello,

    For the regular text field, you can define the property "title" to present
    the tooltip. That is equivalent to the attribute "ToolTip" of the
    server-side control.

    <a "FP_popUpMsg('PSTN Test Message')" title="more information"
    >CALLMaster 3.2 for PSTN</a>
    Vince Xu [MSFT], Jun 16, 2009
    #4
  5. Hello Morris,

    Since I haven't seen your reply after I last posted my reply, I'm writing
    to check the status of this post. Please feel free to let me know if
    there's anything else I can help. Thanks.


    Sincerely,

    Vince Xu

    Microsoft Online Support
    Vince Xu [MSFT], Jun 18, 2009
    #5
  6. Hi,

    Got this to work for me using title.


    --
    Thanks
    Morris


    "Vince Xu [MSFT]" wrote:

    > Hello Morris,
    >
    > Since I haven't seen your reply after I last posted my reply, I'm writing
    > to check the status of this post. Please feel free to let me know if
    > there's anything else I can help. Thanks.
    >
    >
    > Sincerely,
    >
    > Vince Xu
    >
    > Microsoft Online Support
    >
    >
    Morris Neuman, Jun 22, 2009
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gnarlodious
    Replies:
    4
    Views:
    17,553
    elizas
    May 5, 2010
  2. Help with onmouseover Event

    , Mar 7, 2005, in forum: Javascript
    Replies:
    0
    Views:
    136
  3. james
    Replies:
    1
    Views:
    99
    Richard Cornford
    Oct 1, 2006
  4. Replies:
    1
    Views:
    144
  5. tdnnash25
    Replies:
    5
    Views:
    428
    Erwin Moller
    May 12, 2010
Loading...

Share This Page