function StateResponse(transport) { var lstState = new getObj('lstState').obj; if (transport.responseText == '') { lstState.options.length = 0; var objOption = new Option('--- Select Country ---',0); lstState.options[lstState.options.length] = objOption; lstState.disabled=true; } else { var arrState = eval(transport.responseText); lstState.options.length = 0; for(i=0;i 1) { lstState.disabled=false; } else { lstState.disabled=true; } } } function sendStateRequest(countryID, selectedState){ try { if (selectedState) selectedStateID = selectedState; } catch(E) { } var lstState = new getObj('lstState').obj; lstState.options.length = 0; var objOption = new Option('--- Loading... ---',0); lstState.options[lstState.options.length] = objOption; lstState.disabled=true; if (countryID) { new ajax( 'https://www.findacoolboss.org/ajax_state.php', { method: 'post', postBody: 'countryID='+countryID, onComplete: StateResponse } ); } else { country_a = ''; var lstCountry = new getObj('lstCountry').obj; for(iOption = 0; iOption < lstCountry.options.length; iOption++) { if(lstCountry.options[iOption].selected == true) { country_a = country_a + '_' + lstCountry.options[iOption].value; } } new ajax( 'https://www.findacoolboss.org/ajax_state.php', { method: 'post', postBody: 'country_a='+country_a, onComplete: StateResponse } ); } } function CityResponse(transport) { var lstCity = new getObj('lstCity').obj; if (transport.responseText == '') { lstCity.options.length = 0; var objOption = new Option('--- Select State ---',0); lstCity.options[lstCity.options.length] = objOption; lstCity.disabled=true; } else { var arrCity = eval(transport.responseText); lstCity.options.length = 0; for(i=0;i 1) { lstCity.disabled=false; } else { lstCity.disabled=true; } } } function sendCityRequest(countryID, stateID, selectedCity){ try { if (selectedCity) selectedCityID = selectedCity; } catch(E) { } var lstCity = new getObj('lstCity').obj; lstCity.options.length = 0; var objOption = new Option('--- Loading2... ---',0); lstCity.options[lstCity.options.length] = objOption; lstCity.disabled=true; if (countryID) { new ajax( 'https://www.findacoolboss.org/ajax_city.php', { method: 'post', postBody: 'countryID='+countryID+'&stateID='+stateID, onComplete: CityResponse } ); } else { country_a = ''; state_a = ''; var lstCountry = new getObj('lstCountry').obj; for(iOption = 0; iOption < lstCountry.options.length; iOption++) { if(lstCountry.options[iOption].selected == true) { country_a = country_a + '_' + lstCountry.options[iOption].value; } } var lstState = new getObj('lstState').obj; for(iOption = 0; iOption < lstState.options.length; iOption++) { if(lstState.options[iOption].selected == true) { state_a = state_a + '_' + lstState.options[iOption].value; } } new ajax( 'https://www.findacoolboss.org/ajax_city.php', { method: 'post', postBody: 'country_a='+country_a+'&state_a='+state_a, onComplete: CityResponse } ); } }