B
Bosconian
I've been fighting with this for an hour.
My form contains a hidden input with the value initially set to "".
When a user clicks on the link, a function is called that updates the hidden
form value and submits the form.
Unfortunately this generates an error which states the form object is
undefined.
The function looks like
<script type='text/javascript'>
function submitLink(theForm, theName, theValue) {
document.theForm.theName.value = theValue;
document.theForm.submit();
}
</script>
The form looks like
<form action="product/details" method="post" name="catxml" />
<input type="hidden" name="familyid" value="" />
<a href="javascript: submitLink(document.catxml, familyid, '456');">Product
1</a>
</form>
The error reports that 'familyid is undefined'.
Can someone clue me in? Thanks.
My form contains a hidden input with the value initially set to "".
When a user clicks on the link, a function is called that updates the hidden
form value and submits the form.
Unfortunately this generates an error which states the form object is
undefined.
The function looks like
<script type='text/javascript'>
function submitLink(theForm, theName, theValue) {
document.theForm.theName.value = theValue;
document.theForm.submit();
}
</script>
The form looks like
<form action="product/details" method="post" name="catxml" />
<input type="hidden" name="familyid" value="" />
<a href="javascript: submitLink(document.catxml, familyid, '456');">Product
1</a>
</form>
The error reports that 'familyid is undefined'.
Can someone clue me in? Thanks.