Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
WebCalendar and client side events onmouseout

Hi to all,

I am trying to extend the WebCalendar with client side events like onmouseout but I am unable to get it to work.

A code snippet you can find here below. I am enumerating through the days, when a condition is true I am trying to add the onmouseover event to it like this.

document.getElementById(oCalendar.Days[i] = 'BLOCKED SCRIPTalert("hi!");';

The oCalendar.Days[i] gives the id of the table cell of that particular day.

Can someone tell me how it can work?


  • 24497
    Verified Answer


    To process events you may use WebCalendar shortcuts, though your approach also might work. The Days[index].element is already reference to element, so there is no need to use getElementById. Below is example:

    <script type="text/javascript">
    var elem = evt.srcElement;
    if(!elem) elem =;
    var id = elem ? : null;
     if(!id) return;
    var cal = igcal_getCalendarById(null, elem);
     id = id.substring(id.length - 2);
    if(id.charAt(0) == 'd') id = id.substring(1);
     id = parseInt(id);
    var day = cal.Days[id];
    'id=' + id);
    function WebCalendar1_InitializeCalendar(oCalendar)
    var days = oCalendar.Days;
    var i = days.length;
    while(i-- > 0)
    "mouseover", myOverFunct);

    <igsch:WebCalendar ID="WebCalendar1" runat="server">
    <ClientSideEvents InitializeCalendar="WebCalendar1_InitializeCalendar"></ClientSideEvents>

Reply Children
No Data