To fire a javascript on change in the dropdown value in NewForm.aspx in sharepoint2010 RRS feed

  • Question

  • I am working on Sharepoint 2010.

    I am using Sharepoint calender to  book an event.

    There are dropdowns for Start Time and end Time.

    I want to fire javascript on the Change of both dropdowns.

    How to fire a javascript on change in the dropdown value in NewForm.aspx?

    Thursday, August 29, 2013 12:07 PM


  • Hi,

    From your description, you want to fire javascript when the value of DateTime Picker changes.

    We can override the OnPickerFinish function in DatePicker.js to fire the event when the date is updated from the date picker like this:

    function OnPickerFinish(resultfield)
        //your code here

    This link will show how to override the OnPickerFinish function:


    Before coding, a jQuery Library for SharePoint Web Services needs to be downloaded, then we can upload this jQuery Library to a SharePoint document library and reference it at the head of the script like this:

    <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="http://yoursite/yourdocumentlibrary/jquery.SPServices-2013.01.min.js"></script>

    The jquery.SPServices-2013.01.min.js can be downloaded from:


    Feel free to reply if you have any questions.

    best regards

    Friday, August 30, 2013 5:53 AM