0
I have a system where the user will register the information as below:
Note that the registration includes suppliers. This data will appear in another form as below:
I would like the user when selecting one of the suppliers, appeared only the information relating to it lives of the comic. My doubt is in Jquery or Javascript and not in programming, since the registration is already being done, just this view.
From the static form I have this code:
$(document).ready(function(){
$('#select').on('change',function(){
var valor = '#'+$(this).val();
$('#pai').children('div').hide();
$('#pai').childrenvalor).show();
});
});
But how I would do it dynamically?
but if the doubt is in
javascript
, ask the question your codejavascript
to be able to see, otherwise the answer would be "yes, it is possible to filter with javascript"– Ricardo Pontual
So Ricardo, if I had the javascript code, I wouldn’t be here posting my question.
– user24136
then want a javascript code ready to make the filter, that’s it?
– Ricardo Pontual
Ricardo, I don’t have much experience with jquery or javascript. The code I have and use is this:
$(document).ready(function(){
 $('#select').on('change',function(){
 var valor = '#'+$(this).val();
 $('#pai').children('div').hide();
 $('#pai').childrenvalor).show();
 });
});
, but dynamically accurate with values coming from the BD as selected options.– user24136
I think I understood, below this select has a list with several suppliers (li, table, etc), and want to hide and show only the selected, is this?
– Ricardo Pontual
This. However, it is dynamic data, that is, the BD information related to each supplier will come. In a static way I know how to do, my difficulty is because it is dynamic.
– user24136