There is a three level dependent drop-down(country-state-city) using jquery, AJAX and JSON. To redirect the user to a page after he selected city (www.example.com/city, the city is numeric value here) I used the following code, HTML
<select name="city" id="city" class="form-control input-lg" onchange="onfuct()">
<option value="">Select City</option>
</select>
The javascript is here
var value_1 = document.getElementByID('city').value;
function onfuct () {
window.location.replace("www.example.com"/+value_1);
}
Can somebody help me out it is redirecting to "www.example.com/undefined"