HI all,
Using ASP.NET, I have a calendar web control on my page for which I want to fire an event every time a user double clicks one of the dates. Here is my chunk of code that is suppose to accomplish this by assigning javascript to the "ondblclick " event for each day upon rendering.
Pretty straightforward , I think. However, I have a problem in that my alert will not fire when the user double clicks directly on a day's number (which looks to be a link by default), but it will fire just fine when the user double clicks on a day's little box anywhere other than directly on the number.
Methinks that something is going on that the "hyperlink" nature of the day is interfering with my double click event. But I'm not sure how to get around this.
Any help is greatly appreciated.
Robert
Using ASP.NET, I have a calendar web control on my page for which I want to fire an event every time a user double clicks one of the dates. Here is my chunk of code that is suppose to accomplish this by assigning javascript to the "ondblclick " event for each day upon rendering.
Code:
protected void thisCalendar_DayRender(object sender, DayRenderEventArgs e)
{
e.Cell.Attributes.Add("ondblclick", "alert('You double clicked on the link');");
}
Methinks that something is going on that the "hyperlink" nature of the day is interfering with my double click event. But I'm not sure how to get around this.
Any help is greatly appreciated.
Robert
Comment