-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
27 lines (24 loc) · 1.21 KB
/
Copy pathscript.js
File metadata and controls
27 lines (24 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// This is a FRONTEND-ONLY simulation. No data is being saved.
// A real backend is required to make this work.
document.addEventListener('DOMContentLoaded', () => {
const loginForm = document.getElementById('login-form');
const signupForm = document.getElementById('signup-form');
if (loginForm) {
loginForm.addEventListener('submit', (e) => {
e.preventDefault(); // Prevents the form from actually submitting
alert('شبیهسازی ورود موفق! در حال انتقال به سایت اصلی...');
// TODO: In a real app, you would send data to your backend API here.
// After a successful response from the API:
window.location.href = 'https://spenta.github.io';
});
}
if (signupForm) {
signupForm.addEventListener('submit', (e) => {
e.preventDefault();
alert('شبیهسازی ثبتنام موفق! شما وارد شدید. در حال انتقال...');
// TODO: In a real app, you would send data to your backend API here.
// After a successful response from the API:
window.location.href = 'https://spenta.github.io';
});
}
});