|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
OnMouseOver Help BoxHow 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 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. 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? -- Show quoteHide quoteThanks 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. > > 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> 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 Hi,
Got this to work for me using title. -- Show quoteHide quoteThanks 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 > >
Integrating scripts with html
Web format templates Adding "other" data in a formview on insert and update Persisting complex data between calls Using a radiolistbox control within a datalist control Login Controls Resize Gridview width (not column width) based on size of data brought back. full screen web page Grid view Add Dependent Assemblies to Custom Control |
|||||||||||||||||||||||