Dave,
Such a great idea to use a hidden iframe to hold the JavaScript
arrays! It works like a charm. For each pulldown that I need to write I
call a hidden iframe that writes out a JavaScript array from the database.
As each iframe is being loaded I write out a message on the parent page
"Please wait a moment, data has not finished loading..." Once the data is
done loading it automatically calls back to the parent page to create the
pulldown.
Thanks,
Jim Christiano
Clearwire Technologies, Inc.
-----Original Message-----
From: Dave Cahall [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 18, 2001 12:21 PM
To: '[EMAIL PROTECTED]'
Subject: RE: JavaScript Speed Issues
Might I suggest that you use something like a hidden iframe that receives
parameters from a clickable selection on the main page. In the iframe you
then go off and run a coldfusion page that returns a subselection and
populates your dropdown list back on the calling page.
If you need to do this cross browser, you can use a hidden layer for the
Netscape environment and do the same kind of thing.
Dave Cahall
Vice President, Professional Services
Digitaris Technologies, Inc.
Office: 972.690.4131 ext 116
Mobil: 214.914.9947
-----Original Message-----
From: Architect [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 18, 2001 11:40 AM
To: '[EMAIL PROTECTED]'
Subject: RE: JavaScript Speed Issues
All,
Sorry it took me so long to get back to you.
My problem was this: I had a table of 6000 entries and I need a way on the
web front end to offer the user all the entries. The reason I am using
JavaScript to write out the select statement is that I want to include the
functionality of narrowing the list from its entirety down to 0-9, A-E, F-J,
K-O, P-S, T-X, Y-Z, or a text field. I wanted this functionality to be
client side.
My current solution: This table of 6000 entries is part of a hierarchy in
the database. It has a many to one link upwards. I pulled the table that
was directly above the table of 6000 entries in the hierarchy and displayed
that along with a blank pulldown. By choosing one of the options from the
pulldown above the JavaScript populates the pulldown below. Its hard to
explain so I've attached screenshots.
This module is part of a larger system that reads parameters from the
database. Its is dynamic in that the next level down in the table structure
has 19000 records. That module will dynamically display three select menus
each one affecting the one below.
Please let me know if you can think of other ways to handle this.
Thanks,
Jim Christiano
Clearwire Technologies, Inc.
-----Original Message-----
From: Billy Cravens [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 18, 2001 9:38 AM
To: [EMAIL PROTECTED]
Subject: RE: JavaScript Speed Issues
I agree with Dave here. However, there's a couple of things you could try -
1. First of all, don't build HTML in your JavaScript. Build your dropdown
as a skeleton in HTML, and then populate the Option object.
2. Do partial population. You could provide some links that allow the user
to view "portions" of the options - instead of having to populate 6000,
maybe a smaller chunk like 500 or so
3. Why is this done in JavaScript? Why not HTML?
--
Billy Cravens, EDS
[EMAIL PROTECTED]
>From: Dave Cahall <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
>Subject: RE: JavaScript Speed Issues
>Date: Tue, 18 Sep 2001 08:00:46 -0500
>
>6000 items is FAR more than is pratical for a drop down list anyway.
>Imagine trying to scroll through a list like that. There must be a better
>way to segment the drop down list.
>
>
>Dave Cahall
>Vice President, Professional Services
>Digitaris Technologies, Inc.
>Office: 972.690.4131 ext 116
>Mobil: 214.914.9947
>
>-----Original Message-----
>From: Kharal [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, September 18, 2001 1:30 AM
>To: [EMAIL PROTECTED]
>Subject: Re: JavaScript Speed Issues
>
>
>Hi,
>
>Processing through array is always slow, so better way is to either
>hardcode
>the values in the pulldownlist, or store these values in DB and through
>query include values in the pulldown list.
>
>Kharal.
>
>----- Original Message -----
>From: Architect <mailto:[EMAIL PROTECTED]>
>To: '[EMAIL PROTECTED]' <mailto:'[EMAIL PROTECTED]'>
>Sent: Thursday, September 13, 2001 6:35 PM
>Subject: JavaScript Speed Issues
>
>I have an array of about 6000 items and I'm trying to create a HTML
>pulldown
>list by looping through the array and writing out option tags with the
>values filled in from the array. I've encountered a terrible speed issue
>when the browser tries to load it. I've tried a one dimensional array as
>well as two with little improvement. Is there some faster way around this?
>
>var pulldownFieldRS = new Array();
>pulldownFieldRS[0] = new Array()
>pulldownFieldRS[0][0] = '19901002DI';
>pulldownFieldRS[0][1] = '64034';
>. . .
>pulldownFieldRS[5748] = new Array()
>pulldownFieldRS[5748][0] = 'WWZ51';
>pulldownFieldRS[5748][1] = '66848';
>
>
>strPulldownMenu += "<select name='intMarketID'>";
>
> var i;
> for (i=0; i<pulldownFieldRS.length; i++)
> {
> strPulldownMenu += "<option value='" + pulldownFieldRS[i][1] + "'>" +
>pulldownFieldRS[i][0] + "</option>";
> }
>
> strPulldownMenu += "</select>";
>
>Thanks,
>Jim Christiano
>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com
-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org
-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com
-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org
-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com
-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org