Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

ajax onchange dropdown

jQuery(document).ready(function($) {
    $("#opt_level").on('change', function() {
        var level = $(this).val();
        if(level){
            $.ajax ({
                type: 'POST',
                url: 'example-domain.com',
                data: { hps_level: '' + level + '' },
                success : function(htmlresponse) {
                    $('#opt_lesson_list').html(htmlresponse);
                    console.log(htmlresponse);
                }
            });
        }
    });
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: get params from route vuejs 
Javascript :: float to euro curency 
Javascript :: cdn jquery 
Javascript :: typeof 
Javascript :: iterate object 
Javascript :: fixed menu reactjs 
Javascript :: watch with multiple variables vuejs 
Javascript :: how to remove duplicates in js array 
Javascript :: add an array to another array javascript 
Javascript :: nodejs path 
Javascript :: reset input react 
Javascript :: jquery when iframe is loaded 
Javascript :: react fragment 
Javascript :: js find index in list 
Javascript :: binary search algorithm in javascript 
Javascript :: open pdf in browser javascript 
Javascript :: function range() as range js 
Javascript :: modal show with jquery ready function 
Javascript :: check if object has key lodash 
Javascript :: javascript regex cheat sheet 
Javascript :: react inject component into another component 
Javascript :: payloadtoolargeerror node js 
Javascript :: datepicker jquery year range 
Javascript :: chocolatey nodejs 
Javascript :: angular generate without spec 
Javascript :: save canvas as image from website 
Javascript :: jquery if class clicked 
Javascript :: export csv in react 
Javascript :: ajax file form 
Javascript :: run on load js 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =