javascript - display data from database based on drop down selection -


pls me. hav drop down contain shop , shop b.shop has value 1 , shop b has value 2. when select shop dropdown want list data database table corresponding each shop.. html

shop select >shopa >shopb

and js $("#shop").change(function(){

    // selected user's id     var id = $(this).find(":selected").val();      // load in userinfo div above     $("#container").load("table_data.php?id="+id);  }); 

does table_load.php return html elements? jquery documentation:

description: load data server , place returned html matched element.

your php script needs generate html elements inserted container. also, don't need selector, sufficient:

var id = $(this).val(); 

Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -