How to get value from dropdowns for Ajax?

Hello,

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.

Thanks.

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.

Hi,

I want help with javascript part.

Thanks.

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=“http://api.jquery.com/jQuery.ajax/”]$.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=“http://bulletproofajax.com/code/”]code and working examples freely available from the book.