I Am New To Node Js How To Get Dependent Dynamic Dropdown From Database
my node code: app.get('/block_name', function (req,res){ var sql='SELECT `block_name`,`block_id` FROM `tbl_block` '; connection.query(sql,function(err, result) { if (err) th
Solution 1:
Anytime the first drop-down changes value, you need to repopulate the second drop-down based on the select value in the first drop-down - usually by rerunning your ajax call to load the second drop-down, but using the value of the first drop-down to decide which data to request from the server.
You would do this by installing an event handler on the first drop-down so you can detect any time its value is changed and then you would repopulate the second dropdown with a fresh ajax call whenever that event on the first drop-down occurs.
Post a Comment for "I Am New To Node Js How To Get Dependent Dynamic Dropdown From Database"