# Select tags and AJAX

**URL:** <https://www.ruby-forum.com/t/select-tags-and-ajax/90016>\
**Category:** Rails\
**Created:** [March 25, 2007, 3:07am UTC](https://www.ruby-forum.com/t/select-tags-and-ajax/90016 "2007-03-25T03:07:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mephtik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@mephtik](https://www.ruby-forum.com/u/mephtik)\
**Post date:** [March 25, 2007, 3:07am UTC](https://www.ruby-forum.com/t/select-tags-and-ajax/90016/1 "2007-03-25T03:07:27Z")

</div>

Here’s my situation. I’ve got a select form that I’m populating with a  
list of colors. I then have a database with a list of products, and each  
product has a specific color. Some colors have multiple products (ie.  
there are several “green” products). Based on what color the user  
selects, I then want to display (below the form) a list of all products  
that match that color. What I’d like to have happen is, rather than  
clicking on one of the options and hitting submit, I’d like the page to  
(via AJAX) update when I click one of the options. Does anyone have any  
suggestions on how to do this? Thanks for the help!
