Changed around line 1
+ document.getElementById('financeForm').addEventListener('submit', function(event) {
+ event.preventDefault();
+ const phdSalary = parseFloat(document.getElementById('phdSalary').value);
+ const phdYears = parseFloat(document.getElementById('phdYears').value);
+ const onlyfansEarnings = parseFloat(document.getElementById('onlyfansEarnings').value);
+
+ const phdTotal = phdSalary * phdYears;
+ const onlyfansTotal = onlyfansEarnings * 12 * phdYears;
+
+ document.getElementById('phdTotal').textContent = `Total PhD Earnings: $${phdTotal.toLocaleString()}`;
+ document.getElementById('onlyfansTotal').textContent = `Total OnlyFans Earnings: $${onlyfansTotal.toLocaleString()}`;
+
+ if (onlyfansTotal > phdTotal) {
+ document.getElementById('recommendation').textContent = 'Recommendation: Consider OnlyFans!';
+ } else {
+ document.getElementById('recommendation').textContent = 'Recommendation: Stick with your PhD!';
+ }
+ });
+
+ document.getElementById('quizForm').addEventListener('submit', function(event) {
+ event.preventDefault();
+ const passion = parseInt(document.getElementById('passion').value);
+ const comfort = parseInt(document.getElementById('comfort').value);
+
+ if (passion >= 2 && comfort <= 2) {
+ document.getElementById('quizRecommendation').textContent = 'Recommendation: Continue your PhD!';
+ } else if (passion <= 2 && comfort >= 2) {
+ document.getElementById('quizRecommendation').textContent = 'Recommendation: Consider OnlyFans!';
+ } else {
+ document.getElementById('quizRecommendation').textContent = 'Recommendation: Weigh your options carefully!';
+ }
+ });