Hi ,
I used following code to set default value of "All day event" in the SP calendar to true. However, there is a postback when the checkbox is clicked/uncliked and the javascript executes again on the page load not allowing user to unclick All day event.
The code I used is below, how would I modify it to disallow postback when checkbox is unclicked.
<script type="text/javascript">
function DisableReadOnly()
{
// find all the elements with tag Name as INPUT
var elements=document.body.getElementsByTagName("INPUT");
// loop through all the elements till we find an element with type text and title as name of our field
for (index=0; index < elements.length;++index)
{
if(elements[index].name == "ctl00$m$g_97f958d4_996a_42cb_97ef_cbbea8a222fb$ff71$ctl00$ctl00 $AllDayEventField" )
{
elements[index].checked=true;
}
}
}
_spBodyOnLoadFunctionNames.push("DisableReadOnly()");</script>
Regards,
Nemanja