View Full Version : Do you know a website where an option selection list shows you a popup or lightbox

01-20-2012, 05:31 PM
I’d like to find an example of a website, probably an online store, where selecting or mousing over a drop-down selection list or clicking one of the selections shows you an image of what that option looks like. Let’s say color, finish, size, etc.

I’m going to have to use JavaScript or jQuery to do this, as it's on a site with no active scripting language or database available on the server. I'm having a bit of a time finding an event handler that passes the selected OPTION value to a script. Using onMouseover seems to always pass the first OPTION in the list, or the one preset to SELECTED if any one is.

If you have any technical ideas, I'd love to hear them, but my main interest is finding some sample sites where I can see how smoothly the GUI works, and make sure I'm developing something users will love and not find annoying. I definitely don't want lightboxes popping up all over the page when the user moves the mouse toward something other than a Option SELECT list.

01-20-2012, 06:27 PM
Use the select element's onchange event. Example:

<select onchange="alert(this.value);">
<option val="whatever0">Whatever0</option>
<option val="whatever1">Whatever1</option>
<option val="whatever2">Whatever2</option>
<option val="whatever3">Whatever3</option>