• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

how can ı take county and province?

Explorer ,
Oct 14, 2019 Oct 14, 2019

Copy link to clipboard

Copied

ı want to select province and then which ı selected its county wıll come to dropdown list.ıam wrıttıng thıs code.ıts not workıng.can someone help me whats wrong?or are there any dıfferent code for make thıs same code in project

</div>
</div>

<div class="form-group" id="item-city_id">
<label class="col col-4 col-xs-12"><cf_get_lang_main no='559.Şehir'></label>
<div class="col col-8 col-xs-12">
<select name="city_id" id="city_id" style="width:150px;" onchange="LoadCounty(this.value,'county_id','telcod')">
<option value=""><cf_get_lang_main no='322.Seçiniz'></option>
<cfquery name="GET_CITY" datasource="#DSN#">
SELECT CITY_ID,CITY_NAME FROM SETUP_CITY
</cfquery>
<cfoutput query="GET_CITY">
<option value="#city_id#" <cfif get_company.city eq city_id>selected</cfif>>#city_name#</option>
</cfoutput>
</select>
</div>
</div>

<div class="form-group" id="item-county_id">
<label class="col col-4 col-xs-12"><cf_get_lang_main no='1226.Ilce'></label>
<div class="col col-8 col-xs-12">
<select name="county_id" id="county_id" style="width:150px;" <cfif x_district_address_info eq 1>onChange="LoadDistrict(this.value,'district_id');"</cfif>>
<option value=""><cf_get_lang_main no='322.Seçiniz'></option>
<cfquery name="GET_COUNTY" datasource="#DSN#">
SELECT COUNTY_ID,COUNTY_NAME FROM SETUP_COUNTY <cfif len(get_company.city)>WHERE CITY = <cfqueryparam cfsqltype="cf_sql_integer" value="#get_company.city#"></cfif>
</cfquery>
<cfoutput query="get_county">
<option value="#county_id#" <cfif get_company.county eq county_id>selected</cfif>>#county_name#</option>
</cfoutput>
</select>
</div>
</div>

Views

129

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources
Documentation