TheCandyman
Technical User
I need another pair of eyes because this is driving me crazy. Granted, i struggle with JS but I'm still learning.
I keep getting the 'document.form1.name46.value is undefined' error but can't see what its wrong. I have this fire when a drop down menu is changed so the page loads without errors until then. I have tried a few different syntax's but keep having the issue at the same point - name46. I even commented that out and the error goes to the next line. Those lines are hidden on load, could that be it?
I keep getting the 'document.form1.name46.value is undefined' error but can't see what its wrong. I have this fire when a drop down menu is changed so the page loads without errors until then. I have tried a few different syntax's but keep having the issue at the same point - name46. I even commented that out and the error goes to the next line. Those lines are hidden on load, could that be it?
Code:
(in head)
function Blank_Entries(temp){
var temp = parseInt(temp);
if (temp <= 9) {
document.form1.CODE28.selectedIndex = 0;
document.form1.CODE29.selectedIndex = 0;
document.form1.CODE30.selectedIndex = 0;
//var theForm = document.getElementById("form1");
//theForm.name46.value = '';
//document.forms[0].name46.value = '';
document.form1.name46.value = '';
document.form1.name47.value = '';
document.form1.name48.value = '';
document.form1.name49.value = '';
document.form1.name50.value = '';
...
...
(in body)
...
...
<div id="Booth10" style="display:none;">
<label for="fname46">First Name</label><br><input type="text" name="fname46" value="" id="fname46" style="width:150px; display:inline;" onkeydown="return tabOnEnter(this, event);" />
...
</div>