function doSelectCountry(ctrl) { if (ctrl.value!='') { //do cookie and forwarding magic... document.getElementById('selectCountry').submit(); } }