Skip to content

Commit bf56a77

Browse files
Add files via upload
1 parent 8cf4ddd commit bf56a77

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

index.html

+12-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ <h2>Get A Free Quote Today!</h2>
9393
</div>
9494
</section>
9595

96-
<!-- JavaScript for Form Submission Handling -->
96+
<!-- JavaScript for Form Submission Handling and OTHER System Input Toggle -->
9797
<script>
9898
document.getElementById('quote-form').addEventListener('submit', function(event) {
9999
event.preventDefault(); // Prevent default form submission
@@ -106,13 +106,24 @@ <h2>Get A Free Quote Today!</h2>
106106
if (response.ok) {
107107
alert('SUCCESS! Your quote request has been sent.');
108108
this.reset();
109+
document.getElementById('other-system').style.display = 'none'; // Hide OTHER input after form reset
109110
} else {
110111
alert('FAILED... Please try again later.');
111112
}
112113
}).catch(error => {
113114
alert('FAILED... Please try again later.');
114115
});
115116
});
117+
118+
// JavaScript to toggle "Specify Other System" input
119+
document.getElementById('system').addEventListener('change', function() {
120+
const otherSystemInput = document.getElementById('other-system');
121+
if (this.value === 'OTHER') {
122+
otherSystemInput.style.display = 'block';
123+
} else {
124+
otherSystemInput.style.display = 'none';
125+
}
126+
});
116127
</script>
117128

118129
</body>

0 commit comments

Comments
 (0)