I have two fields on my webpage. When one of then is focused I want to disable the other one, but if the user then clicks the disabled field, I want it to disable the first fields and then enable the new focused field. Is this possible in javascript?
so far I've tried:
<script lang="text/javascript">
function disableSum(){
document.getElementById('BugID').disabled=false;
document.getElementById('Summary').disabled=true;
console.log('Sum Disabled');
}
function disableBug(){
document.getElementById('BugID').disabled=true;
document.getElementById('Summary').disabled=false;
console.log('Bug Disabled');
}
function checkInput(){
}
</script>