Changed around line 1
+ document.addEventListener('DOMContentLoaded', function() {
+ const uploadForm = document.getElementById('uploadForm');
+ const loginForm = document.getElementById('loginForm');
+ const signupForm = document.getElementById('signupForm');
+ const notesGrid = document.getElementById('notesGrid');
+
+ uploadForm.addEventListener('submit', function(event) {
+ event.preventDefault();
+ const noteTitle = document.getElementById('noteTitle').value;
+ const noteContent = document.getElementById('noteContent').value;
+ const noteFile = document.getElementById('noteFile').files[0];
+
+ if (noteTitle && noteContent) {
+ const noteElement = document.createElement('div');
+ noteElement.className = 'note';
+ noteElement.innerHTML = `
+
${noteTitle}
+ `;
+ notesGrid.appendChild(noteElement);
+ uploadForm.reset();
+ }
+ });
+
+ loginForm.addEventListener('submit', function(event) {
+ event.preventDefault();
+ const email = document.getElementById('loginEmail').value;
+ const password = document.getElementById('loginPassword').value;
+
+ if (email && password) {
+ alert('Login successful!');
+ loginForm.reset();
+ }
+ });
+
+ signupForm.addEventListener('submit', function(event) {
+ event.preventDefault();
+ const name = document.getElementById('signupName').value;
+ const email = document.getElementById('signupEmail').value;
+ const password = document.getElementById('signupPassword').value;
+
+ if (name && email && password) {
+ alert('Sign up successful!');
+ signupForm.reset();
+ }
+ });
+ });