Give this a shot if your using an HTML form.

Chris Martin

<SCRIPT LANGUAGE="JavaScript">
<!--
  var url

  function changepage(formObject)
  {
    url = formObject.options[formObject.options.selectedIndex].value;

    if(url != "empty")
      {
      window.location = url;
      url = "";
      }
  }
//-->
</SCRIPT>

<select onChange="changepage(this)">
 <cfloop query="GetSomeMore">
  <option value="#cgi.SCRIPT_NAME#?Address1=#Address1#">#Address1#
</select>

<cfif isDefined("url.Address1")>

 <br>
 <cfinput type="text" name="SAddress2" class="style1" 
style="background-color:FFFFCC">
 <br>
<cfif #Address3# Contains "">

<cfinput type="text" name="SAddress3" class="style1" 
style="background-color:FFFFCC" value="#Address3#">
<br>
</cfif>
<cfinput type="text" name="SCity" class="style1" 
style="background-color:FFFFCC" value="#City#">
&nbsp;&nbsp;
<cfinput type="text" name="SState" class="style1" 
style="background-color:FFFFCC" value="#State#" size="1" 
maxlength="2">
&nbsp;&nbsp;
<cfinput type="text" name="SPostal_Code" class="style1" 
style="background-color:FFFFCC" value="#Postal_Code#" size="3">

</cfif>



John Eubanks wrote:
>> Hi, I am having a quandry of a moment.  I have a dynamic select box, 
>> which populates with an address (or addresses).  Below that, I have 
>> text boxes for fields such as city, state, and zip.  I need to see if 
>> I can get some assistance on the population of those text boxes if the 
>> address changes in the select.  The coding is listed below, and any 
>> and all assistance is welcome.
>>
>> Code:
>>
>>                                                                              
>> <cfselect name="SShip" class="style1" 
>> style="background-color:FFFFCC">
>   
>> <cfloop query="GetSomeMore">
>>      <option value="#Address1#">#Address1#
>   
>> </cfloop>
>> </cfselect>
>> <br>
>> <cfinput type="text" name="SAddress2" class="style1" 
>> style="background-color:FFFFCC">
>> <br>
>> <cfif #Address3# Contains "">
>> <cfinput type="text" name="SAddress3" class="style1" 
>> style="background-color:FFFFCC" value="#Address3#">
>> <br>
>> </cfif>
>> <cfinput type="text" name="SCity" class="style1" 
>> style="background-color:FFFFCC" value="#City#">
>> &nbsp;&nbsp;
>> <cfinput type="text" name="SState" class="style1" 
>> style="background-color:FFFFCC" value="#State#" size="1" 
>> maxlength="2">
>> &nbsp;&nbsp;
>> <cfinput type="text" name="SPostal_Code" class="style1" 
>> style="background-color:FFFFCC" value="#Postal_Code#" size="3">
>
> Chris,
>
> I am running CF 7 Enterprise 
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion is delivering applications solutions at at top companies 
around the world in government.  Find out how and where now
http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289088
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to