Skip to content

Commit

Permalink
new commit
Browse files Browse the repository at this point in the history
  • Loading branch information
eylulozatman committed Nov 18, 2023
1 parent f412615 commit 6cf2e05
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
18 changes: 18 additions & 0 deletions hello.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Hello Page</title>
</head>
<body>
<script>

const urlParams = new URLSearchParams(window.location.search);
const title = urlParams.get('title');

const h1 = document.createElement('h1');
h1.textContent = 'hello ' + title;
document.body.appendChild(h1);
</script>
</body>
</html>
10 changes: 6 additions & 4 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ document.addEventListener('DOMContentLoaded', function() {
menuItems.forEach(item => {
item.addEventListener('click', function() {
const title = this.getAttribute('data-title');
window.open(`hello_${title}.html`, '_blank');
window.open(`hello.html?title=${title}`, '_blank');
});
});

Expand Down Expand Up @@ -102,16 +102,18 @@ document.addEventListener('DOMContentLoaded', function() {
isOk += 1;
}

if ((isnull === false ) && ( !emailInput.includes('@') || !emailInput.includes('.com'))) {
if ((isnull === false ) && ( !emailInput.includes('@') || !emailInput.includes('.com')))
{
alert("Please enter a valid email!");
isOk +=1;
}

const phoneValidationMessage = document.getElementById("phoneValidationMessage");
const phoneCodesSelect = document.getElementById("phoneCodesSelect");

if ((isnull=== false) && (phoneCodesSelect.value !== "+90" || phoneInput.value.length !== 10 || isNaN(phoneInput.value))) {
alert("Phone number should have +90 code and should be 10 correct format");
if ((isnull=== false) && (phoneCodesSelect.value !== "+90" || phoneInput.value.length !== 10 || isNaN(phoneInput.value)))
{
alert("Phone number should have +90 code and correct format");
isOk += 1;
}
if(isOk === 0)
Expand Down

0 comments on commit 6cf2e05

Please sign in to comment.