southbeach
Programmer
I have this script
and I am getting an error
AddCharge is the name of my form
I admit that is has been a very long day but I really cannot see the reason to this error. I even found some pages sampling this type of code and they worked OK but not within my page.
What am I doing wrong?
Thanks!
Code:
<script type="text/javascript">
function RemCharge(id,code,desc,rate,qty,units,amount) {
var agree = confirm('You have requested to remove following entry:\n Code: ' + code + '\nDesc: ' + desc + '\n Qty: ' + qty + '\n : ' + units + '\nAmnt: ' + amount + '\n\nARE YOU SURE YOU WANT TO REMOVE THIS ENTRY?');
if (agree)
{
document.getElementById('submitID').value='Remove';
document.getElementById('remidID').value=id;
document.AddCharge.submit();
}
}
</script>
and I am getting an error
Code:
document.AddCharge.submit is not a function
AddCharge is the name of my form
Code:
<form name="AddCharge" action="<? echo $_SERVER['PHP_SELF']; ?>" method="post">
<table border="0" cellpadding="0" cellspacing="0">
I admit that is has been a very long day but I really cannot see the reason to this error. I even found some pages sampling this type of code and they worked OK but not within my page.
What am I doing wrong?
Thanks!