Changed around line 1
+ document.getElementById('decisionForm').addEventListener('submit', function(e) {
+ e.preventDefault();
+
+ // Get input values
+ const phdIncome = parseFloat(document.getElementById('phdIncome').value);
+ const ofPotential = parseFloat(document.getElementById('ofPotential').value);
+ const happinessPhD = parseInt(document.getElementById('happinessPhD').value);
+ const happinessOF = parseInt(document.getElementById('happinessOF').value);
+
+ // Calculate weighted scores
+ const phdScore = (phdIncome * 0.4) + (happinessPhD * 60);
+ const ofScore = (ofPotential * 0.4) + (happinessOF * 60);
+
+ // Determine decision
+ const resultDiv = document.getElementById('result');
+ const decisionText = document.getElementById('decisionText');
+ const explanation = document.getElementById('explanation');
+
+ if (ofScore > phdScore) {
+ decisionText.textContent = "Consider OnlyFans!";
+ explanation.textContent = "Based on your inputs, OnlyFans seems to be the better choice for you right now.";
+ } else {
+ decisionText.textContent = "Stick with your PhD!";
+ explanation.textContent = "Based on your inputs, continuing your PhD seems to be the better choice for you right now.";
+ }
+
+ resultDiv.classList.remove('hidden');
+ });