views:

585

answers:

4

Hi guys,

I have an ImageButton in ASP.Net on my site, filled with the property ToolTop:

<asp:ImageButton CausesValidation="false" Enabled="false" ID="imgHelp" ImageUrl="Images/Icons/help.png" Width="15px" Height="15px"
                            runat="server" ToolTip="Die Referenz der Anfrage, z.B.: Bieter- oder Auktionsnummer"  />

But in FireFox the ToolTip isn't shown up.

Someone an Idea for which reasen OR know a good free to use ToolTip-UC?


This is the generated code:

<input type="image" name="ctl00$ContentPlaceHolder1$imgHelp" id="ctl00_ContentPlaceHolder1_imgHelp" disabled="disabled" title="Die Referenz der Anfrage, z.B.: Bieter- oder Auktionsnummer" src="Images/Icons/help.png" style="height:15px;width:15px;border-width:0px;" />


Ok I see my problem, when the ImageButton is Enabled, the tooltip works, but the user can click on it (what I don't want). Any ideas?

+1  A: 

I don't know ASP.NET, but I'm sure looking at the generated HTML will tell you more on why it doesn't work in Firefox.

Oskar
+2  A: 

My guess is it won't work in Firefox because you have the control's enabled property set to false. If you set it to true does this fix the problem?

Update- this is by design in Firefox. If you want to get round this, you will have to use something like a JavaScript tooltip mechanism.

Update 2:

Use the asp:Image tag:

<asp:Image runat="server" ID="the Id" 
   ToolTip="Die Referenz der Anfrage, z.B.: Bieter- oder Auktionsnummer"  
   ImageUrl="TheImage.jpg" 
   AlternateText="Some alt here" />
RichardOD
Yes, I tried this, but than it's clickable, what I don't want to have.
Kovu
If you don't want it to be clickable why are you adding it as an ImageButton and not just a normal image?
richeym
In a normal Image I can't have the ToolTip!
Kovu
@richeym- that's a good point. What's wrong with using <asp:Image /> or even <img> html tag?
RichardOD
Ok I found my fool: I tried to use the <img>-html-tag and not the Image ASP tag, thank you!
Kovu
+1  A: 

You can try adding "onclick=return(false);" so that clicking means nothing. Also change the css of the pointer to normal so it won't even appear as clickable.

Faruz
Good idea, upvote, but the best answer is allready given
Kovu
A: 

How to apply the css for
ToolTip="Die Referenz der Anfrage, z.B.: Bieter- oder Auktionsnummer" in any control