Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
HTML Pages with CSS and JavaScript
Getting Select Value In Firefox
Luke Shannon
Ranch Hand
Posts: 240
3
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
This works fine in IE, but not in Firefox.
Any ideas why?
var numberPics = (document.all) ? document.all("numberPics").options[document.all("numberPics").selectedIndex].text : document.getElementById("numberPics").options[document.getElementById("numberPics").selectedIndex].text;
Thanks,
Luke
Luke
SCJP
Eric Pascarello
author
Posts: 15385
6
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
document.all is IE only
you need to use
document.formName.elementName
Eric
Luke Shannon
Ranch Hand
Posts: 240
3
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Yep, that got it. Thanks.
var list = document.addAuction.numberPics; numberPics = list.options[list.selectedIndex].text;
Luke
SCJP
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
How to get values from a dropdownlist
call Action from javascript
select an item in dropdown box.
getting and setting value in a combo box..VIA javascript
Using Javascript to Select an Item in a Select List
More...