Welcome Guest, Not a member yet? Register   Sign In
Dynamic generated dropdown value is not passed to controller after page refresh.
#7

(01-08-2019, 04:29 AM)ragingTorch Wrote: if filterProducts dropdown is being generated dynamically then jQuery may not have access to it to detect the change event. Try changing the first line from

Code:
$('#filterProducts').on('change', function(b) {

to

Code:
$('body').on('change', '#filterProducts', function(b) {

$('#filterProducts') is the form which contains the dropdowns. I detect change events and then i generate the results in the main body. 
The two dropdowns are "#category" and the dynamically generated one, "#size".

If you have any better approach as for how to filter the data then feel free to tell!

//Life motto
if (sad() == true) {
     sad().stop();
     develop();
}
Reply


Messages In This Thread
RE: Dynamic generated dropdown value is not passed to controller after page refresh. - by HarrysR - 01-08-2019, 06:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB