How to pass this variable value here? Below code is not working. And all other discussions on Stackoverflow are unclear.
Try this:
var dist = document.getElementById('value').value; if (dist != "") { window.location.href="district.php?dist="+dist; }