Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
crotonrz authored Oct 31, 2024
1 parent 25ca3e7 commit e239ee3
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,10 @@ <h2>Generated Text</h2>
function generateText() {
const characterName = document.getElementById("characterName").value;
const email = document.getElementById("email").value;
const comment = document.getElementById("comment").value;
const comment = document.getElementById("comment").value || "No comments"; // Provide default text if comments are empty

// Check if email is valid
if (!email.includes("@") || !email.includes(".")) {
alert("Please enter a valid email address.");
return;
}

// Generate output text
const output = `Character Name: ${characterName}\nEmail: ${email}\nComments: ${comment}`;
// Format the output text
const output = `EZ Server :: Character: ${characterName} E-Mail: ${email} Comments: ${comment}`;
document.getElementById("output").textContent = output;
}

Expand Down

0 comments on commit e239ee3

Please sign in to comment.