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

Problems adding option to select #35

Open
tribemax opened this issue Jan 25, 2017 · 1 comment
Open

Problems adding option to select #35

tribemax opened this issue Jan 25, 2017 · 1 comment

Comments

@tribemax
Copy link

Select:

<select id="selectcias" class="my-select"> <option>Seleccione...</option> </select>

Create a .js file with the following code:

`
(function ($) {
$.get("/SigaBrokers.xml", function (Broker) {
$(Broker).find("BD").each(function () {

        var ID = $(this).attr('ID');
        var nombre = $(this).attr('nombre');
        var WebSpeed = $(this).attr('WebSpeed');
        var Hosting = $(this).attr('Hosting');
        var imagen = $(this).attr('imagen');
        var activo = $(this).attr('activo');

        var xmlurl = Hosting + WebSpeed + "SigaNet.p?userwin=usuariowin&opc=4"

        $('#selectcias').append('<option data-img-src="/Images/Logos/' + imagen + '" value="' + ID + '">' + nombre + '</option>');
    });
});

})(jQuery);
`

Not adding new options to select, shows me the object without problems. Previously I had the jquery code inside the page and loaded the options but I did not show them, I could see it in the chrome debugger, but clicking on the select did not show me anything. I hope you can help me.

@websemantics
Copy link
Owner

Trying to catch up with issues, did you manage to solve this?

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

2 participants