Results 1 to 2 of 2

Thread: Do you know a website where an option selection list shows you a popup or lightbox

  1. #1
    Join Date
    Jun 2009
    Posts
    52
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Do you know a website where an option selection list shows you a popup or lightbox

    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.
    Last edited by ETpro; 01-20-2012 at 05:44 PM.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Use the select element's onchange event. Example:

    Code:
    <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>
    </select>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •