jQWidgets Forums

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 9 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Reset jqxInput back to prompt #80642

    sjkcwatson
    Participant

    In the Init content of the popup window, I initialize an input box with a prompt string and no value selected

        $("#PopUpAddCAPAWindow").jqxWindow({
            theme: 'oriasmenu',
            width: 900,
            height: 650,
            resizable: false,
            isModal: true,
            autoOpen: false,
            cancelButton: $("#aCancelCAPA"),
            modalOpacity: 0.2,
            showCloseButton: true,
            initContent: function () {
                //** Set the format for the window and initialize all the controls in it (set values in the window open function beacuse this only runs once)
                $("#aCapaRespEmp").jqxInput({
                    source: asearchActiveEmpAdapter,
                    placeHolder: vEmpSearchPrompt,
                    displayMember: "s_EmpSearchStr",
                    valueMember: "s_EmpID",
                    width: 240,
                    height: 20
                });
    

    The popup window is repetitively opened and closed. When it is opened again, I want to reset the aCapaRespEmp control so it is back to the placeholder prompt and nothing is selected.

    The alert is happening, but the placeholder remains what was selected the last time the window was open (however there is no value selected). Can you please tell me what I am missing.

        $('#PopUpAddCAPAWindow').on('open', function (event) {
    
            //  vCAPAIsUpdated = 'N'; //init so it only updates once
            //**** When the Add window is opened, set the default values of the controls - have to do this each time the window is opened to
            //**** refresh the controls from a previous add if not the first time in
    alert('resetting');
            alert('vRespPersonEID=' + vRespPersonEID);  //this alert happens is null so it's not holding it
    
            $("#aCapaRespEmp").jqxInput({
                placeHolder: vEmpSearchPrompt //this doesn't seem to do anything - the prompt doesn't show back up just leaves it blank.
            });
    

    Thanks!

    Reset jqxInput back to prompt #80661

    Peter Stoev
    Keymaster

    Hi sjkcwatson,

    placeHolder is displayed when the input’s value is empty so set the Input’s value to an empty string and the place holder will be displayed.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.