Skip to content

Commit

Permalink
Create index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
crotonrz authored Oct 30, 2024
0 parents commit 160f43f
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>EZ Server Input Form</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
}
input, textarea {
width: 100%;
margin-bottom: 10px;
padding: 8px;
}
button {
padding: 10px;
cursor: pointer;
margin-top: 10px;
}
#output {
margin-top: 20px;
border: 1px solid #ccc;
padding: 10px;
background-color: #f9f9f9;
display: none;
}
</style>
</head>
<body>

<h1>EZ Server Input Form</h1>
<form id="inputForm">
<label for="character">Character:</label>
<input type="text" id="character" name="character" required>

<label for="email">Your Paypal Associated Email:</label>
<input type="email" id="email" name="email" required>

<label for="comments">Comments:</label>
<textarea id="comments" name="comments" rows="4" required></textarea>

<button type="submit">Generate Output</button>
</form>

<div id="output"></div>
<button id="copyButton" style="display:none;">Copy to Clipboard</button>

<script>
document.getElementById('inputForm').addEventListener('submit', function(event) {
event.preventDefault();

const character = document.getElementById('character').value;
const email = document.getElementById('email').value;
const comments = document.getElementById('comments').value;

const outputText = `EZ Server :: Character: ${character} E-Mail: ${email} Comments: ${comments}`;

const outputDiv = document.getElementById('output');
outputDiv.textContent = outputText;
outputDiv.style.display = 'block';

const copyButton = document.getElementById('copyButton');
copyButton.style.display = 'inline-block';
copyButton.onclick = function() {
navigator.clipboard.writeText(outputText).then(() => {
alert('Copied to clipboard!');
}).catch(err => {
console.error('Failed to copy: ', err);
});
};
});
</script>

</body>
</html>

0 comments on commit 160f43f

Please sign in to comment.