+ CYF is a long established fact that a reader will be distracted by the readable content
+ of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal
+ distribution of letters, as opposed to using 'Content here, content here', making it look like readable
+ English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model
+ text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions
+ have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like.
+
+ There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by
+ injected humour, or randomised words which don't look even slightly believable. If you are going to use
+ a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle
+ of text. All the Lorem Ipsum generators on the Internet.
+
+
+ "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.
+ The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed
+ sometimes by accident, sometimes on purpose (injected humour and the like."
+
+
+
+
+
+
+
+
More Information
+
+ For more information about our product and services, please contact us using the for below.
+
+
Items market * are required field
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/js/customer.js b/js/customer.js
new file mode 100644
index 0000000..c3393bd
--- /dev/null
+++ b/js/customer.js
@@ -0,0 +1,73 @@
+/*================= Form validation =================*/
+window.addEventListener('load', function () {
+ submitForm.addEventListener('click', function (event) {
+ event.preventDefault();
+ const name = document.getElementById('name');
+ const email = document.getElementById('email');
+ const phoneNumber = document.getElementById('phoneNumber');
+ function validName(name) {
+ return name.value !== "";
+ }
+ function validEmail(email) {
+ const pattern = /^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$/;
+ return pattern.test(email.value);
+ }
+ function validPhoneNumber(phoneNumber) {
+ return phoneNumber.value !== "" && phoneNumber.value.length < 12;
+ }
+ if (validName(name) && validName(name) && validPhoneNumber(phoneNumber)) { alert('Thank you for register with us')}
+
+ if (validName(name)) {
+ return true;
+ name.classList.remove('error');
+ }else{
+ name.classList.add('error');
+ }
+
+ if (validName(name)) {
+ alert('yeas');
+ return true;
+ email.classList.remove('error');
+ }else{
+ email.classList.add('error');
+ }
+
+ if (validPhoneNumber(phoneNumber)) {
+ phoneNumber.classList.remove('error');
+ return true;
+ }else{
+ phoneNumber.classList.add('error');
+ }
+
+ });
+}, false);
+/*==================== Start AJAX Get Data===================*/
+window.addEventListener('load', function () {
+const resivedNews = document.getElementById('resivedNews');
+
+const request = new XMLHttpRequest();
+request.onreadystatechange = function () {
+ if (request.readyState === 4 ){
+ if (request.status === 200) {
+ const data = JSON.parse(request.responseText);
+ for (i = 0; i < data.length; i++) {
+ resivedNews.innerHTML += "