Picky, pesky browsers - keep me hopping!
This works in IE, but only in IE:
<script language="JavaScript" type="text/javascript">
function clear1() {
document.getElementById('specid').options.value = "None";
document.getElementById('office_id').options.value = "None";
}
function clear2() {
document.getElementById('docid').options.value = "None";
document.getElementById('office_id').options.value = "None";
}
function clear3() {
document.getElementById('docid').options.value = "None";
document.getElementById('specid').options.value = "None";
}
</script>
There are three dropdowns on a page - one each for doctors, specialies, and locations. This is a search page and the point is that when a selection is made in a dropdown, the other two revert back to the first item, which has the text "Select from list" and the Value="None"
The code is called when a dropdown is changed, like this:
<select name="docid" onchange="clear1()">
So, for example, a doctor is selected and the specialty and location dropdowns go back to saying "Select from list"
This works in IE and has no effect in the other browsers. Any ideas how to fix this?
Thanks!
KB
This works in IE, but only in IE:
<script language="JavaScript" type="text/javascript">
function clear1() {
document.getElementById('specid').options.value = "None";
document.getElementById('office_id').options.value = "None";
}
function clear2() {
document.getElementById('docid').options.value = "None";
document.getElementById('office_id').options.value = "None";
}
function clear3() {
document.getElementById('docid').options.value = "None";
document.getElementById('specid').options.value = "None";
}
</script>
There are three dropdowns on a page - one each for doctors, specialies, and locations. This is a search page and the point is that when a selection is made in a dropdown, the other two revert back to the first item, which has the text "Select from list" and the Value="None"
The code is called when a dropdown is changed, like this:
<select name="docid" onchange="clear1()">
So, for example, a doctor is selected and the specialty and location dropdowns go back to saying "Select from list"
This works in IE and has no effect in the other browsers. Any ideas how to fix this?
Thanks!
KB