Here is a snippet of my HTML code:
<form id="form">
<input id="deleteNumber" name="del" type="hidden" />
<input id="addAddress" name="addAddress" type="hidden" />
...
...
...
<a href="javascript:deleteAddress();" class="deleteItem"/></a>
<a href="javascript:addNextAddress()">Add address </a>
</form>
<script type="text/javascript">
function addNextAddress() {
var parent = document.getElementById('form');
var child = document.getElementById('form').del;
perent.removeChild(child);
document.getElementById('form').submit();
}
</script>
<script type="text/javascript">
function deleteAddress() {
var r=confirm(text);
if (r == true) {
var parent = document.getElementById('form');
var child = document.getElementById('form').addAddress;
perent.removeChild(child);
document.getElementById('form').submit();
}
}
</script>
I encountered a JavaScript error:
Uncaught ReferenceError: perent is not defined
Seeking assistance from anyone who can help. Thanks!