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