none
Register a JavaScript/JQuery eventhandler on project custom fields on a PDP RRS feed

  • Question

  • Hi all,

    I'd like to display some dynamic content on a PDP based on a custom field value selected. I tried to register the blur/change/cocus events on the input field tag of the custom field, but the Events are never fired when using the field on the PDP. Any ideas, how this can be achieved?

    Kind regards,
    Trutz

    Code example using jQuery (thevalue is properly found just the event is not fired):

    function runAtTheEnd()
    {
        listenOnMyEvent();
       $("#idCF_df6bb925-32eb-e311-93f8-00155d321e0").on("change", function() {
           listenOnMyEvent();
     });
    };


    function listenOnMyEvent()
    {
     console.log($("#idCF_df6bb925-32eb-e311-93f8-00155d321e0e").val());
    }

    ExecuteOrDelayUntilScriptLoaded(runAtTheEnd, "sp.js");


    Tuesday, June 24, 2014 2:10 PM