Basically you need to have all color variations of that frame i.e. image of brown, red, white etc. frames as images.
For example your images could be named like:
/images/frame_1_brown.jpg
/images/frame_1_red.jpg
/images/frame_1_white.jpg
On the select you have something like this:
<select name="color">
<option value="/images/frame_1_brown.jpg" selected="selected">Brown</option>
<option value="/images/frame_1_red.jpg">Red</option>
<option value="/images/frame_1_white.jpg">White</option>
</select>
You have an image tag like:
<img src="/images/frame_1_brown.jpg" alt="Glasses" id="product-image"/>
Then the javascript will look like:
$('select[name=color]').change(function(){
$('#product-image').attr('src', $(this).val());
})
Assuming that you use jQuery of course.
Basically this will change the image's src attribute when you change the selection of the dropdown.