Dear Sirs,
The below script is working fine on IE but notin Mozilla, could anyone help on this to be working on Mozilla as well?
<script type="text/javascript">
window.onload=function() {
if (document.getElementById) {
document.getElementById("country").onchange=function() { switchme(this); }
}
}
function switchme(SNewSel) {
var ind = SNewSel.selectedIndex;
var txt = document.getElementById('country_code');
switch (ind) {
case 1: txt.value = "+93"; break;
case 2: txt.value = "+358"; break;
case 3: txt.value = "+355"; break;
default:
txt.value='';
break;
}
}
</script>
<form action="output.php" method="post" name="myform" id="myform">
<select name="country">
<option value="Choose One" selected="selected" >Choose One</option>
<option value="AFG">Afghanistan</option>
<option value="ALA">Aland Islands</option>
<option value="ALB">Albania</option>
</select>
thanks in advance,
Cole