ajax - how to update a div with jquery based on drop down selection -


I have a drop down menu with three values, each has an option id I I want to request ajax and want to update a div on the basis of feedback from that request.

I have a sample code on jsbin in which I am trying to make an AJAX request to IMDB. I do not want to parse the answer back to IMDB, but someone should show me how to update a Div based on feedback from IDDB is just a sample because I like to implement something in my application like this I am trying to ... The only difference is that instead of making callback to IMDB, I will make a callback for my application.

Please

See something like this:

   

Whenever there is a value of select element change, it will send a GET request ( to / your / page? Value = thislectValue ) and the ID yourdiv < Load the feedback in / code> with div .

Of course you have to adjust selectors and parameter names.

If you want to post a post , You can use the $. Post () function with callback:

  $ ('selec ('To / your / page', {value: $ (this) .val ()}, function (data) {$ ('# yourdiv'). Html (data) );});});  

Reference: ,,


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -