I have an upload button with a status icon next to it:
When the status icon is moused-over, the tooltip is shown. I also wanted the tooltip to display when the user moused over the "Upload" button, so I added this code:
ForceTooltip is a javascript function that looks like this:
The bug occurs when I mouse over the button BEFORE I have moused over the status icon. When I load the page and mouse over the icon, the tooltip repositions itself. After that the upload button mouseover works as expected.
However after initial load, if I mouse over the button before the icon, I get an exception:
A Runtime Error has occurred.
Do you wish to Debug?
Line: 6170
Error: Sys.ArgumentOutOfRangeException: Value must be an integer.
Parameter name: x
Actual value was NaN.
Note that the code here may not reproduce the error, as my button/icon/tooltip is inside a radpane in a contentplaceholder.
My app is written for ASP.NET 2.0. Please help!
<tr runat="server" id="tr_upload"> |
<td> |
Podcast File: |
</td> |
<td> |
<asp:FileUpload runat="server" ID="fupPodcast" /> |
<asp:Button runat="server" ID="btnFileUpload" Text="Upload" Height="22px" /> |
</td> |
<td style="text-align: right; width: 40px;"> |
<asp:Image runat="server" ID="imgPodcastFeedback" ImageUrl="~/Images/checkmark.png" ImageAlign="AbsMiddle" /> |
<telerik:RadToolTip ID="RadToolTip1" runat="server" Animation="None" TargetControlID="imgPodcastFeedback" Position="TopRight" AutoCloseDelay="0" HideDelay="500" Width="200px"> |
<asp:Label runat="server" ID="lblToolTip1"></asp:Label> |
</telerik:RadToolTip> |
</td> |
</tr> |
When the status icon is moused-over, the tooltip is shown. I also wanted the tooltip to display when the user moused over the "Upload" button, so I added this code:
btnFileUpload.Attributes.Add("onmouseover", "ForceTooltip('" + RadToolTip1.ClientID + "', 'SHOW')"); |
btnFileUpload.Attributes.Add("onmouseout", "ForceTooltip('" + RadToolTip1.ClientID + "', 'HIDE')"); |
ForceTooltip is a javascript function that looks like this:
function ForceTooltip(id, action) |
{ |
var tooltip = $find(id); |
if(action == "SHOW") |
tooltip.show(); |
else |
tooltip.hide(); |
} |
The bug occurs when I mouse over the button BEFORE I have moused over the status icon. When I load the page and mouse over the icon, the tooltip repositions itself. After that the upload button mouseover works as expected.
However after initial load, if I mouse over the button before the icon, I get an exception:
A Runtime Error has occurred.
Do you wish to Debug?
Line: 6170
Error: Sys.ArgumentOutOfRangeException: Value must be an integer.
Parameter name: x
Actual value was NaN.
Note that the code here may not reproduce the error, as my button/icon/tooltip is inside a radpane in a contentplaceholder.
My app is written for ASP.NET 2.0. Please help!