Changed around line 1
+ document.getElementById('decisionForm').addEventListener('submit', function(e) {
+ e.preventDefault();
+
+ // Get input values
+ const phdYears = parseInt(document.getElementById('phdYears').value);
+ const currentIncome = parseInt(document.getElementById('currentIncome').value);
+ const ofPotential = parseInt(document.getElementById('ofPotential').value);
+ const satisfaction = parseInt(document.getElementById('satisfaction').value);
+
+ // Calculate recommendation
+ const financialDifference = ofPotential - currentIncome;
+ const timeInvestment = phdYears * 12;
+ const satisfactionFactor = satisfaction / 10;
+
+ let recommendation = '';
+ let explanation = '';
+
+ if (financialDifference > 2000 && satisfactionFactor < 0.6) {
+ recommendation = 'Consider OnlyFans';
+ explanation = `With a potential income increase of $${financialDifference} per month and low PhD satisfaction, OnlyFans might be a better fit.`;
+ } else if (financialDifference > 1000 && satisfactionFactor < 0.8) {
+ recommendation = 'Maybe OnlyFans';
+ explanation = `You could potentially earn $${financialDifference} more per month, but consider your PhD satisfaction carefully.`;
+ } else {
+ recommendation = 'Stick with PhD';
+ explanation = `The financial difference isn't significant enough, and your PhD satisfaction is relatively high.`;
+ }
+
+ // Display results
+ document.getElementById('recommendation').textContent = recommendation;
+ document.getElementById('explanation').textContent = explanation;
+ document.getElementById('result').classList.remove('hidden');
+
+ // Scroll to results
+ document.getElementById('result').scrollIntoView({ behavior: 'smooth' });
+ });