OZONE Asylum
Forums
DHTML/Javascript
populating a select list
This page's ID:
28574
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Ok, ok the first link on my first google search is a bit incorrect : I only read their [i]ClearOptions()[/i] and [i]AddToOptionList()[/i] functions and they are correct. It's how they use that is not. They pass the [b]select[/b] itself instead of its [b]options[/b] property. Tssss. But hey you can't expect 100% correct JS infos from a site called ASPWatch. However the code on PPK's site is correct and it shows up in [b]second place[/b] on my first search, and [b]first place[/b] on my second search. Obviously someone didn't do his homework seriously. Also, to make sure I'm really anal here, if you read out loud:[small][code]document.getElementById('dd_location2').length = new Option(OptionText, OptionValue);[/code][/small]you can see it doesn't make sense. [i]Length equal new option.[/i] No, that's not what you want. What you want is to add an option to the collection of options of a select. ps: can anyone see it touches a nerve when I see that kind of threads ? [url=http://www.p01.org/][img]http://poi.ribbon.free.fr/files/p01_ozoneasylum_sig_galaxy.gif[/img][/url] [small](Edited by [url=http://www.ozoneasylum.com/user/2185]poi[/url] on 10-26-2006 20:48)[/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »