servlets for dropdown list are running infintely

servlets for dropdown list are running infintely

e8416o8e8416o8 Posts: 25Questions: 9Answers: 1

There are several dropdowns in new window. The options of dropdowns are populated with json data correctly.
But the servlets are running continuously.

Here is code snippet:

Could you pinpoint what is causing the infinite running?

...

editor.dependent( 'finClass', function (val, data, callback) {
    $.ajax ({
        type: 'POST',
        url: '/myPayers/GetFinClassLst',
        dataType: 'json',
        success: function (json) {
            callback(json);
        }
    });

}); 


editor.dependent( 'facility', function (val, data, callback) {
    $.ajax ({
        type: 'POST',
        url: '/myPayers/GetFacilityLst',
        dataType: 'json',
        success: function (json) {
            callback(json);
        }
    });

}); 

...

Answers

  • allanallan Posts: 61,814Questions: 1Answers: 10,123 Site admin

    I'm afraid I can't help from that information. I'd really need a link to the page showing the issue, or possibly I might be able to figure out what is going on if you could show me the data that each is loading.

    My guess is that each is triggering a change event on the other - would that be correct? If so, then yes, it would give an infinite loop.

    Allan

This discussion has been closed.