Search code examples
jquerysharepointbindinginfopath

Binding JQuery to infopath form


I'm trying to set up a form for a sharepoint list using infopath. However, I require some extra functionality so I'm trying to do something with jquery but I can never bind anything in the form.

I added a new content editor web part with this content

<script type="text/javascript">
function readyCall() {
    $('select').each(function() {
        $(this).change(function() {
            alert('n');
        });
    });
}
$(window).load(function() {
    window.setTimeout(readyCall, 1500);
});</script>​​​

Solution

  • You can simply do this...

    <script type="text/javascript">
    $(function(){
     $('select').change(function() {
                alert('n');
          });
    });
    </script>​​​