I’m attempting to add and remove curly braces around a textbox value with javascript.
What I have done so far is to add them correctly but I’m at a loss for removing them on uncheck. Here is my code:
<script>
Toggle();
function Toggle(){
if (document.form1.icd.checked){
document.form1.amln.value= "{" + document.form1.amln.value + "}";
}
}
</script>
<input type="checkbox" name="icd" value="icd" onClick="Toggle();" />
<input type="text" name="amln" id="amln" />
Match Beginning and End
Remove any { and }
Combine it with the check