Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: cannot call methods on puidropdown prior to initialization; attempted to call method 'option' #298

Closed
hybitu opened this issue May 13, 2020 · 0 comments

Comments

@hybitu
Copy link

hybitu commented May 13, 2020

I got this error, the first combobox, works perfectly but the second with the same code but different id, does not. Please could anyone give me any idea.

A B

$.ajax({
type: "GET",
url: "controller/listA",
success: function(data, textStatus, jqXHR) {
$("#a").puidropdown("option", "data", eval("(" + data + ")"));

                },
                error: function(jqXHR, textStatus, errorThrown) {
                    addPanMsgFrmTipoRecargoDescuento("error", {summary: "error:", detail: "xhr:  " + jqXHR + ", textStatus: " + textStatus + ", errorThrown: " + errorThrown});
                }

});

$.ajax({
type: "GET",
url: "controller/listB",
success: function(data, textStatus, jqXHR) {
//alert(data);
$("#B").puidropdown("option", "data", eval("(" + data + ")"));
},
error: function(jqXHR, textStatus, errorThrown) {
addPanMsgFrmTipoRecargoDescuento("error", {summary: "error:", detail: "xhr: " + jqXHR + ", textStatus: " + textStatus + ", errorThrown: " + errorThrown});
}
});

@hybitu hybitu closed this as completed Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant