Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Getting the value of a selected option
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
skunkbad  
View profile  
 More options Jul 7, 10:44 pm
From: skunkbad <iamsen...@gmail.com>
Date: Tue, 7 Jul 2009 19:44:55 -0700 (PDT)
Local: Tues, Jul 7 2009 10:44 pm
Subject: Getting the value of a selected option
I've got a standard select box with options, and the select box has an
id of "theme_choice"

I've found the following script online, but it isn't popping up an
alert when a selection is made:

$$('#theme_choice').each(function(elem){
                                if (elem.selected) alert(elem.text + ' ' + elem.value);
                });

Prototype is called just before this in the head area of the page. I'm
using the latest version RC3.

This is for a theme changer script on my website. I have a current
theme changer script, but I'm trying to play around with prototype.

I don't know if it is spam to put a link to my website or reference
it, so I won't, but the select box with options is really just a
standard form element. Nothing special.

Thanks for your help.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google