Skip to content

Commit a685203

Browse files
authored
Update index.html
Updated
1 parent 2ebb695 commit a685203

File tree

1 file changed

+4
-27
lines changed

1 file changed

+4
-27
lines changed

index.html

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -137,38 +137,15 @@ <h1>Welcome to the Smart Farm Monitoring System</h1>
137137
// Login Form Handling
138138
document.getElementById('loginForm').addEventListener('submit', function(e) {
139139
e.preventDefault();
140-
140+
141141
const email = document.getElementById('email').value;
142142
const password = document.getElementById('password').value;
143143

144144
if(email && password) {
145-
document.getElementById('loginContainer').style.display = 'none';
146-
147-
148-
// Add Dashboard navigation button
149-
const navButton = document.createElement('button');
150-
navButton.textContent = 'Go to Dashboard';
151-
navButton.style.cssText = `
152-
position: fixed;
153-
bottom: 20px;
154-
right: 20px;
155-
padding: 12px 24px;
156-
background-color: #2c5f2d;
157-
color: white;
158-
border: none;
159-
border-radius: 8px;
160-
font-size: 16px;
161-
cursor: pointer;
162-
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
163-
transition: all 0.3s ease;
164-
z-index: 1000;
165-
`;
166-
navButton.addEventListener('click', () => {
145+
// Redirect to dashboard upon successful validation
167146
window.location.href = 'dashboard.html';
168-
});
169-
document.body.appendChild(navButton);
170-
}
171-
147+
}
148+
});
172149
</script>
173150
</body>
174151
</html>

0 commit comments

Comments
 (0)