Home All Groups Group Topic Archive Search About
Author
14 Jun 2009 7:50 PM
Morris Neuman
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

Author
15 Jun 2009 5:25 AM
Vince Xu [MSFT]
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.
Author
15 Jun 2009 6:36 PM
Morris Neuman
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


Show quoteHide quote
"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.
>
>
Author
16 Jun 2009 2:56 AM
Vince Xu [MSFT]
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"
Show quoteHide quote
>CALLMaster 3.2 for PSTN</a>
Author
18 Jun 2009 10:14 AM
Vince Xu [MSFT]
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
Author
22 Jun 2009 7:13 PM
Morris Neuman
Hi,

Got this to work for me using title. 


--
Thanks
Morris


Show quoteHide quote
"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
>
>