/    Sign up×
Community /Pin to ProfileBookmark

beginner question

hi everyone,

This is the first time I try to add javascript to my webpage. What I want to do is basically add a tooltip to rows in a gridview. Now, I found this link which generates the code for me:

[url]http://www.guistuff.com/tooltipgen.shtml[/url]

copy/pasting the tooltip code worked fine. However, I do not get how to add this code to my gridview:

[CODE]<a href=”javascript:void(0)” onMouseover=”EnterContent(‘ToolTip’,’Tooltip Title’,’Tooltip Content’); Activate();” onMouseout=”deActivate()”>ToolTip Me</a> [/CODE]

so I have to tag this to this object:

[CODE]<asp:GridView Style=”left: 186px; position: absolute; top: 171px” ID=”GridView” runat=”server” AutoGenerateColumns=”False” DataSourceID=”SqlDataSourceRemote” BackColor=”White” BorderColor=”#CCCCCC” BorderStyle=”None” BorderWidth=”1px” CellPadding=”3″ Width=”335px” Height=”119px” OnRowDataBound=”GridView_RowDataBound” DataKeyNames=”CA_Name” Font-Names=”Verdana” Font-Size=”Small”>
<RowStyle ForeColor=”#000066″ />
<SelectedRowStyle BackColor=”#669999″ Font-Bold=”True” ForeColor=”White” />
<PagerStyle BackColor=”White” ForeColor=”#000066″ HorizontalAlign=”Left” />
<HeaderStyle BackColor=”#006699″ Font-Bold=”True” ForeColor=”White” /><FooterStyle BackColor=”White” ForeColor=”#000066″ />
<Columns>
<asp:BoundField DataField=”CA_Name” HeaderText=”Competency Area” SortExpression=”CA_Name” />
<asp:BoundField DataField=”Week_of_Availability” HeaderText=”Week” SortExpression=”Week_of_Availability” >
<ItemStyle HorizontalAlign=”Right” />
</asp:BoundField>
<asp:BoundField DataField=”Year” HeaderText=”Year” SortExpression=”Year” />
<asp:BoundField DataField=”Date_of_entry” HeaderText=”Date of Entry” SortExpression=”Date_of_entry”
DataFormatString=”{0:M-dd-yyyy}”
HtmlEncode=”False”
/>

</Columns>
</asp:GridView>[/CODE]

how do I do this?

Thanks for your help!

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@savvykmsOct 30.2007 — Two things:

1) is that ASP on a javascript board?

2) add onmouseover="whatever" onmouseout="whatever" to anything that needs a tooltip
Copy linkTweet thisAlerts:
@DohmakerauthorOct 31.2007 — 1- yes it is, like I said I am a total newbie and its the first time I try javascript I figured I could get help from this forum since this is a javascript. I guess I'll try an ASP forum.

2- yes, I knew that much, what I couldn't figure out is where to put those onmouseover="whatever" onmouseout="whatever" in the code of my gridview.

thanks for your help though
×

Success!

Help @Dohmaker spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...