I got this code for a form to update the variable 'num' without reloading the page:
Code: Select all
var choose = document.getElementById("demovis");
choose.onchange = function() {
var num = this.options[this.selectedIndex];
if(num.value != "blank" ){
window.location = "index.php?num="+num.value;
}
}