diff --git a/contactus.html b/contactus.html index 123d023..b774096 100644 --- a/contactus.html +++ b/contactus.html @@ -5,8 +5,6 @@ - - Contact Us Page @@ -23,163 +21,95 @@ z-index: 1000; /* Ensure the trail is above everything */ pointer-events: none; /* Prevent the circles from interfering with mouse events */ } - - + /* Style for error messages */ + .error-message { + color: red; + font-size: 12px; + display: none; /* Initially hide error messages */ + } + - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - -
-
- -
-
+ +
- -
-
-

Contact Us

-

- At Car Rental Service we are here to assist you with all your car rental needs. Whether you have questions about our services, need help with a reservation, or want to provide feedback, our team is ready to help. Reach out to us via phone, email, or by filling out the contact form below. We look forward to hearing from you and ensuring your car rental experience is smooth and enjoyable. - -Feel free to customize it further to better fit your specific needs! -

-
-
- -
-
- -
-
-
- -
- -
-

Address

-


-
-
- -
-
- -
- -
-

Phone

-

-
-
- -
-
- -
- -
-

Email

-

-
-
-
- -
-
-

Send Message

-
- - Full Name -
- -
- - Email -
- -
- - Type your Message... -
- -
- +
+
+

Contact Us

+

+ At Car Rental Service we are here to assist you with all your car rental needs... +

+
- -
- -
-
-
-
- - + + // Clear previous error messages + nameError.style.display = "none"; + emailError.style.display = "none"; + // Validate Full Name + const fullname = document.getElementById('fullname').value; + if (!fullname) { + nameError.style.display = "block"; // Show error message + valid = false; // Set valid to false + } + // Validate Email + const email = document.getElementById('email').value; + const emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; // Simple email regex + if (!emailPattern.test(email)) { + emailError.style.display = "block"; // Show error message + valid = false; // Set valid to false + } + + // Prevent form submission if invalid + if (!valid) { + event.preventDefault(); // Stop form submission + } + }); + +