Changed around line 1
+ document.getElementById('suitability-form').addEventListener('submit', function(e) {
+ e.preventDefault();
+
+ // Get input values
+ const experience = parseInt(document.getElementById('experience').value);
+ const skills = parseInt(document.getElementById('skills').value);
+ const education = parseInt(document.getElementById('education').value);
+ const certifications = parseInt(document.getElementById('certifications').value);
+
+ // Calculate score
+ const score = Math.min(100,
+ (experience * 2) +
+ (skills * 5) +
+ (education * 10) +
+ (certifications * 3)
+ );
+
+ // Display result
+ const scoreElement = document.getElementById('score');
+ const feedbackElement = document.getElementById('feedback');
+
+ scoreElement.textContent = score;
+
+ if (score >= 80) {
+ feedbackElement.textContent = "Excellent fit! You're highly qualified for this position.";
+ } else if (score >= 60) {
+ feedbackElement.textContent = "Good fit! You meet most of the requirements.";
+ } else if (score >= 40) {
+ feedbackElement.textContent = "Moderate fit. Consider developing more skills.";
+ } else {
+ feedbackElement.textContent = "Low fit. You might need more experience or qualifications.";
+ }
+
+ // Smooth scroll to result
+ document.getElementById('result').scrollIntoView({ behavior: 'smooth' });
+ });