mirror of
https://github.com/Alvin-Zilverstand/Spik-en-span.git
synced 2026-03-06 03:06:41 +01:00
34 lines
997 B
JavaScript
34 lines
997 B
JavaScript
document.getElementById('ticketForm').addEventListener('submit', function (e) {
|
|
e.preventDefault();
|
|
|
|
const name = document.getElementById('name').value;
|
|
const email = document.getElementById('email').value;
|
|
const category = document.getElementById('ticketCategory').value;
|
|
const quantity = document.getElementById('ticketQuantity').value;
|
|
|
|
|
|
const ticketId = `TICKET-${Date.now()}`;
|
|
|
|
|
|
const qrContent = `Name: ${name}, Email: ${email}, Category: ${category}, Quantity: ${quantity}, Ticket ID: ${ticketId}`;
|
|
|
|
|
|
const qrCodeContainer = document.getElementById('qrCodeContainer');
|
|
qrCodeContainer.innerHTML = '';
|
|
const qrCode = new QRCode(qrCodeContainer, {
|
|
text: qrContent,
|
|
width: 200,
|
|
height: 200,
|
|
});
|
|
|
|
alert('Ticket(s) successfully generated!');
|
|
});
|
|
|
|
function toggleVideo() {
|
|
const video = document.getElementById('myVideo');
|
|
if (video.paused) {
|
|
video.play();
|
|
} else {
|
|
video.pause();
|
|
}
|
|
} |