Login or Sign Up
Logging in...
Remember me
Log in
Forgot password or user name?
or
Sign Up
Log in with
Search in titles only
Search in JavaScript programming only
Search
Advanced Search
Forum
Groups
Today’s Posts
Calendar
Forum
Client side development
JavaScript programming
Announcement
Collapse
No announcement yet.
how to use selectbox data on the same page
Collapse
X
Collapse
Posts
Latest Activity
Photos
Search
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
srinivas.krish
New to the CF scene
Join Date:
Aug 2005
Posts:
1
Share
Tweet
#1
how to use selectbox data on the same page
Aug 4, 2005, 10:00 AM
i want to use the selected data of a select box in the same page where the select box is how can i use javascript to do the same can anyone help me on this.
cheers, Murthy.
vwphillips
CodingForum Senior
Join Date:
Mar 2005
Posts:
4584
Share
Tweet
#2
Aug 4, 2005, 03:02 PM
bit of an open question
A SelectList has options
each option may have a value and text
<option value="Fred" >The Text Fred</option>
the specific option vale and text can be establish on an onchange event by examining the selectedIndex option value and or text
MyValue=obj.options[obj.selectedIndex].value;
MyText=obj.options[obj.selectedIndex].text;
where obj is the SelectList object
alternatively the values and text can be recorded in an array
and used as global variables for any other requirements on the page
If you post a specific requirement, can help more.
Vic
God Loves You and will never love you less.
http://www.vicsjavascripts.org/Home.htm
If my post has been useful please donate to
http://www.operationsmile.org.uk/
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
X
Comment