Support for ajax data with <select> element

One more attempt to fix the inconsistency of the API. This patch allows using ajax requests with <select> element instead of hidden input.

This is an updated previous pull request #624 and it also addresses #279