No hard and fast rules there--you'd have to experiment. It's a "pay now or pay later" situation basically, because the data has to be loaded SOMETIME. Whether you do it all at once and make the user wait, thereby offering them a more immediate experience after the initial load, or if you make them wait a little bit each time they select something while the page loads, that's a call that doesn't have a "right" answer. It depends on the situation and what you're trying to accomplish.

Matt

On Jun 23, 2005, at 5:26 PM, Laila Oommen wrote:

Thank you..I am not familiar with it..is it efficient if the list is a little too long?

Laila

From: Matthew Woodward <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: Re: onChange=populate()
Date: Thu, 23 Jun 2005 07:19:53 -0500

Without doing a page refresh the only real way to accomplish this is to pre-load your database information into javascript arrays (using CFWDDX is probably the slickest way to handle this) and then the rest of the functionality can be built completely in javascript similar to this:
http://javascriptkit.com/script/script2/multiplecombo.shtml

Matt

On Jun 23, 2005, at 7:10 AM, Laila Oommen wrote:


Code is a drop down pick list field..When one of the codes from the list is selected, I want the other two fields to be populated using the corresponding values in the database.

Actually, I am looking for an easy javascript coding to get this accomplished.

Laila



From: Anthony Frey <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: Re: onChange=populate()
Date: Wed, 22 Jun 2005 08:21:42 -0700 (PDT)

http://www.webpasties.com/xmlHttpRequest/ xmlHttpRequest_tutorial_1.html



--- Laila Oommen <[EMAIL PROTECTED]> wrote:

> Has any one got a script to make this work?
>
> When the code is selected, I want the city and the
> state to be populated
> with values from database.
>
>
> <script language="javascript">
>       function populate()
> </script>
>
>    <tr>
>       <td>CODE</td>
>       <td colspan="2">
>         <select name="code" onChange=populate()>
>           <option selected>Select one</option>
>            <cfquery name="getvalues">
>               SELECT DISTINCT code
>               FROM tblRegion
>            </cfquery>
>           <cfoutput query="code">
>           <option value="">#code#</option>
>           </cfoutput>
>         </select>
>       </td>
>     </tr>
>     <tr>
>         <td>CITY</td>
>         <td><input type="text" name="city"></td>
>     </tr>
>     <tr>
>         <td>STATE</td>
>         <td><input type="text" name="state"></td>
>     </tr>
>
> Thanks
>
> Laila
>
>
>
----------------------------------------------------------
> To post, send email to [email protected]
> To unsubscribe:
>    http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
> To subscribe:
>
> http://www.dfwcfug.org/form_MemberRegistration.cfm
>
>
>


Anthony C. Frey
214-529-1507
[EMAIL PROTECTED]




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:
   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
   http://www.dfwcfug.org/form_MemberRegistration.cfm






----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:   http://www.dfwcfug.org/form_MemberRegistration.cfm





--
Matthew Woodward
[EMAIL PROTECTED]


----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:   http://www.dfwcfug.org/form_MemberRegistration.cfm





----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:   http://www.dfwcfug.org/form_MemberRegistration.cfm




--
Matthew Woodward
[EMAIL PROTECTED]


----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe: http://www.dfwcfug.org/form_MemberUnsubscribe.cfm To subscribe: http://www.dfwcfug.org/form_MemberRegistration.cfm


Reply via email to