Skip to content

Ondblclick is not working??

Sreenish

Asked Jul 15, 2015, 8:54 PM EDT1 answer
Share
LinkedInX
Hello..
Am using one calendar in my webform ...if i doubleclick on date cell it is not working??
if anyone knows  share the  answer...and am posting what i have tried...
 
 
Script::
 
<script type="text/javascript">
JavaScript
        window.onload = function () {
            var timer;
            var el = document.getElementById('Calendar1');
            el.onclick = function () {
                if (timer) clearTimeout(timer);
                timer = setTimeout(function () { alert('<%= Calendar1.SelectedDate.Date.ToLongDateString() %>'); }, 250);
                document.getElementById("GridView1").style.display = 'block';
            }
            el.ondblclick = function Cal1() {
                clearTimeout(timer);
                alert('<%= Calendar1.SelectedDate.Date.ToLongDateString() %>'+"DoubleClick");
                document.getElementById("Mdl1").style.display = 'block';
            }
        }
</script>

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 1 short reply
    • 0
      Hope none knows
      0