How to get value from dropdowns for Ajax?


I have 41 <select> fields in a form. When a user makes any selection or change to any dropdown I want to do ajax and send the values of 41 dropdown’s to a php page which will compute the values and return a single value which should be displayed in a div.

I don’t want ready made code, please just push me in the correct direction.


Do you want to know how to write the PHP code that computes the value?
Or do you need help with the javascript part? In that case, I’ll ask for the thread to be moved to the JS forum, where you’ll probably be able to get more help.


I want help with javascript part.


One of the easy ways to use ajax us via a library that handles much of the work for you, such as jQuery and the $.post() or [url=“”]$.ajax() commands.

If instead though you want to learn how to do ajax code yourself, one of the best resources that we can show you is the Bulletproof Ajax book, which also makes all of the [url=“”]code and working examples freely available from the book.