By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,481 Members | 1,211 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,481 IT Pros & Developers. It's quick & easy.

Dynamic OPTION items in a SELECT list?

P: n/a
Hello,

I have an HTML page I'm trying to send down to the users browser that
contains all data for a few SELECT objects (to reduce round-trips), and I'd
like the SELECT drop down lists to control what parts of the data are
presented in the other SELECT lists.

I don't have much JavaScript experience, but I have seen suggestions along
the lines of "Create a JavaScript array that holds all the data and rebuild
the OPTION list in the SELECT lists as needed".

That's great, but I don't know where to begin, does anyone have an actual
code example of how to do this?

Thanks.

--
William Fields
MCSD - Microsoft Visual FoxPro
US Bankruptcy Court
Phoenix, AZ

"I have no special talents, I am only passionately curious"

- Albert Einstein


Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
William Fields wrote:
Hello,

I have an HTML page I'm trying to send down to the users browser that
contains all data for a few SELECT objects (to reduce round-trips), and I'd
like the SELECT drop down lists to control what parts of the data are
presented in the other SELECT lists.

I don't have much JavaScript experience, but I have seen suggestions along
the lines of "Create a JavaScript array that holds all the data and rebuild
the OPTION list in the SELECT lists as needed".

That's great, but I don't know where to begin, does anyone have an actual
code example of how to do this?


news://inetbws1.citec.qld.gov.au:119/Ri**************@news.optus.net.au

or

<URL:http://groups-beta.google.com/group/comp.lang.javascript/browse_frm/thread/ee05c0cbb52fa5f9/a66b396081eaac80?q=Equivalent+to+display:none+for+ %3Coption%3E+in+IE&_done=%2Fgroup%2Fcomp.lang.java script%2Fsearch%3Fgroup%3Dcomp.lang.javascript%26q %3DEquivalent+to+display:none+for+%3Coption%3E+in+ IE%26qt_g%3D1%26searchnow%3DSearch+this+group%26&_ doneTitle=Back+to+Search&&d#a66b396081eaac80>

or

search for "Equivalent to display:none for <option> in IE"
--
Rob
Jul 23 '05 #2

P: n/a
William Fields wrote:
I have an HTML page I'm trying to send down to the users browser that
contains all data for a few SELECT objects (to reduce round-trips),
and I'd like the SELECT drop down lists to control what parts of the
data are presented in the other SELECT lists.


There is a lot of code out there showing different ways to accomplish this.
My library is kind of an all-in-one approach that handles almost all cases
that most people encounter:
http://www.javascripttoolbox.com/dynamicoptionlist/

Before implementing a solution which requires javascript, make sure that you
either have a non-javascript backup method, or know that you're excluding
users who may have javascript disabled.

--
Matt Kruse
http://www.JavascriptToolbox.com
Jul 23 '05 #3

P: n/a
All I have to say is WOW!

Thanks Matt.

--
William Fields
MCSD - Microsoft Visual FoxPro
US Bankruptcy Court
Phoenix, AZ

"I have no special talents, I am only passionately curious"

- Albert Einstein

"Matt Kruse" <ne********@mattkruse.com> wrote in message
news:d0********@news2.newsguy.com...
William Fields wrote:
I have an HTML page I'm trying to send down to the users browser that
contains all data for a few SELECT objects (to reduce round-trips),
and I'd like the SELECT drop down lists to control what parts of the
data are presented in the other SELECT lists.


There is a lot of code out there showing different ways to accomplish
this.
My library is kind of an all-in-one approach that handles almost all cases
that most people encounter:
http://www.javascripttoolbox.com/dynamicoptionlist/

Before implementing a solution which requires javascript, make sure that
you either have a non-javascript backup method, or know that you're
excluding users who may have javascript disabled.

--
Matt Kruse
http://www.JavascriptToolbox.com

Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.