Most of the code below is just included so I could use a cut and paste to assure that everything was being presented completely. The script executes perfectly except for the line where it is to set the status field to "REFERRED". This is from a form containing 31 questions. Each question has the potential to cause the submission to be referred rather than quoted. The script ignores that command on every question; so, I have included the html line that contains the field, "status." It used to work. Now it doesn't. Can anybody figure out what is wrong?
Code:
<p>
<input type="text" name="status" id="status" size="20" tabindex="-1">
</p>
if (document.screenTwo.nearH2O[0].checked==true) { // NO
document.getElementById('nearWater').value="NO";
document.getElementById('cellOutput02').innerHTML="Property is not located within 10 miles of an ocean, bay, or waterway";
document.getElementById('response2').value="Property is not located within 10 miles of an ocean, bay, or waterway";
} else if (document.screenTwo.nearH2O[1].checked==true) { // YES
document.getElementById('nearWater').value="YES";
document.getElementById('status').value ="REFERRED";
document.getElementById('cellOutput02').innerHTML="Property is located within 10 miles of an ocean, bay or waterway";
document.getElementById('response2').value="Property is located within 10 miles of an ocean, bay, or waterway";
var issue = "Property is located within 10 miles of an ocean, bay, intercostal waterway";
if(document.getElementById('issue1').value==""){
document.getElementById('issue1').value = issue;
} else if(document.getElementById('issue2').value==""){
document.getElementById('issue2').value = issue;
}
}
Comment