First of all, I am using Dreamweaver CS4. ( If that matters ).

I am using a list-menu that is populated using a large table of SIC Industry Codes, ( about 15,000 ).

My query is:

SELECT DISTINCT `sic_code` , `sic_industry`
FROM `smf_sictable`

Both sic_code & sic_industry are indexed.

When I test this online, the dropdown list box takes about 10-15 seconds to fully load and while it is loading, you can see all of the data loading into the dropdown list box.

I have tried to list the values directly into my page like this:

<select name="Industry:" class="autoconvert">
<option value="00000" selected="selected">Enter Industry Name Here...</option>
<option value="11100">Wheat Farm</option>
<option value="11200">Rice Importer/computer Consulting</option>
<option value="11500">Corn Farm Soybean Farm Real Property Lessor</option>
<option value="11500">Corn Farm Soybean Farm</option>
<option value="11600">Soybean Farm</option>
<option value="11904">Cash Grains Farm</option>
</select>

The autoconvert class was purchased as a dreamweaver extension. This extension allows you to convert a Combo Box into an Autocomplete field.

This seems to work somewhat quicker than taking a trip to the database. However, I can't help but to think that there must be some way that I can pre-load these values.

Is there a faster, more efficient way of populating a list menu using php, or some other language ?

I will need to use this list-menu (combobox) more than once, does anyone know how I go about making this into a function ?

Thank you,
Terry Mullins

    i would never create a list box of 15,000, or more than 100 with out a really good reason, not very usable for the end user, i think autocompleate\search is your best option.

      dagon;10964622 wrote:

      i would never create a list box of 15,000, or more than 100 with out a really good reason, not very usable for the end user, i think autocompleate\search is your best option.

      I agree, however the problem is with populating the autocomplete\search in a combobox takes awhile and it dosn't look very professional when populating this field from the database.

        if a 'while' is more than a second i would look at the sql and ajax

          dagon;10964625 wrote:

          if a 'while' is more than a second i would look at the sql and ajax

          I could simplify the sql query by simply using SELECT *. I still would end up with over 15,000 records. Is there a way that I can pre-load this data or maybe populate this field with an xml file ?

            the autocompleate would be doing a select where search terms* only returning the matching rows much faster than returning all 15000

              dagon;10964627 wrote:

              the autocompleate would be doing a select where search terms* only returning the matching rows much faster than returning all 15000

              That would sure be nice. However, the autocomplete is merely a javascript extension (add-on) for dreamweaver. The autocomplete has to be applied, (used in conjunction with), to a list-menu.

                dagon;10964632 wrote:

                i don't think we are talking about the same thing
                this is the autocompleate i use (well one of them)

                jQuery plugin: Autocomplete

                aboves demo page

                This is the auto complete that I am currently using: http://www.topdreamweaverextensions.com/autocomplete

                I am kinda new to jQuery. I have the jQuery utilities toolset with CUTs version 1.02 extension installed on Dreamweaver. ( Author, Sag-e-Atta ). Do you know if the autocomplete that you are referring to work well with Dreamweaver CS4 ?

                I am looking into the website that you have referred me to, specifically, http://jqueryui.com. I was just thinking that you may have some more inside knowledge with regard to this.

                Hopefully your suggestion may resolve the issue that I am having... I will continue to pursue this information...

                Thanks again for your assistance.

                Terry Mullins

                  i wouldn't use the one you have it loads the whole list anyway which defeats most of the benefit of using it in the first place.

                    I am going to download this and give it a try... it looks like it just might be what the doctor ordered 🙂

                      The demo's look great, however, I am having problems figuring out how to use the callback to use it with my mysql database. Do you know anything about this ?

                      As I mentioned earlier, I am very new to Jquery... Thanks again,

                      Terry Mullins

                        Write a Reply...