function Calendar_DateClick(event, DateId, SelectedColor, SelectedFontColor, DateBGColor, DateFontColor, AMColor, AMFontColor, PMColor, PMFontColor, UnAvailableColor, UnAvailableFontColor) { if (event.srcElement.getAttribute("ISDate") == "") return var i switch (event.srcElement.getAttribute("ISDate")) { case "D": { if (typeof (objPrevDateTD) == 'object') { objPrevDateTD.style.backgroundColor = DateBGColor objPrevDateTD.style.color = DateFontColor } event.srcElement.style.backgroundColor = SelectedColor; event.srcElement.style.color = SelectedFontColor; objPrevDateTD = event.srcElement if (event.srcElement.getAttribute("AM") == "true") { } $('#myModal').modal(); break; } } }
srcElement is only available in IE. In all other browsers it is target: var target = event.target || event.srcElement; if(target.onclick == null) { // shorter than getAttribute('onclick') //... document.mainForm.submit(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)