OnMouseOver Help Box

M

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>
 
V

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.
 
M

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?
 
V

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"
 
V

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Onmouseover 1
Help 1
Need help with code on website (noob) 2
Help in hangman game 1
Popup HTML help 5
I need help making a zooming function 11
I need help fixing my website 2
Onmouseover 7

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top