0
onchange doesn’t work, it just works on the first selection, then it doesn’t. ideas ??
function getComboA(sel) {
$(document).ready(function(){
var id = sel.value;
$('#frontend').bcp({
'ID': id,
'loadURL': 'bcp/db/carrega.php',
'sendURL': 'bcp/db/send.php'
});
})
};
What do you have besides the first selection? What do you mean by "AFTER"?
– Allan Andrade
because I have a select dropdown with airports, and if selecting Porto loads the availability of Porto, if it is Lisbon as Lisbon.. , that is, select your departure airport -> dropdown with value in foreach php from bd mysql .. I just want to change the select to change the var id to the corresponding value.
– user3528489
Data is uploaded and sent in json..
– user3528489
Because I have mastered PHP but Javascript doesn’t really.. and there must be something missing, some little code..
– user3528489
You recreated the element in the DOM?
– Allan Andrade
Yes... this with gift I think yes
– user3528489
Every time you recreate the element, you have to call the function again.... test there and tell me if it worked ok?
– Allan Andrade
Why not use Ajax? is very practical to work with php + ajax. See my example code http://answall.com/questions/144032/redirecionar-p%C3%A1gina-passing-Sponse-do-ajax-para-uma-div/144050#144050
– KingRider