My attempt to update a form is causing some issues. I have been conducting tests with the following elements:
<span id="a">30 <span id="aa" style="display:none;"><input type="text" id="aa" name="q"/></span></span>
<span id="cq"><a href="javascript:changeQty()">Change</a></span>
<span id="cq2" style="display:none"><a href="javascript:save()">save</a></span>
<script>
function changeQty(){
document.getElementById("a").style.display="hidden";
document.getElementById("aa").style.display="inline";
document.getElementById("cq").style.display="hidden";
document.getElementById("cq2").style.display="inline";
}
</script>
Despite my efforts, I am facing difficulties in hiding certain fields. Interestingly, when I click on the Change
link, the hidden fields become visible. What could be the issue here?