Skip to content

Commit

Permalink
Fixed missing displayelement and wrong target ID in JS
Browse files Browse the repository at this point in the history
  • Loading branch information
GitStudying authored Aug 2, 2023
1 parent d1878ac commit 2668937
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ <h2>Help and information</h2>
<div id="results">
<p id="platresult"></p> <!-- 3.13 eur -->
<p id="totalcost"></p> <!-- 20.22 eur -->
<!--<p id="noprofit"></p>--> <!-- 20.02 eur -->

<!--<p id="noprofit"></p>-->
<p id="cheapestOption"></p>
<p id="profit"></p> <!-- 1.43 eur -->
</div>
</div>
Expand Down Expand Up @@ -222,7 +222,7 @@ <h2>Help and information</h2>

document.getElementById("profit").innerHTML = "Total profit " + profit.toFixed(2);

document.getElementById("noprofit").innerHTML = "The cheapest option available here is: " + cheapest_plat + " at a price of: " + lowest_price.toFixed(2);
document.getElementById("cheapestOption").innerHTML = "The cheapest option available here is: " + cheapest_plat + " at a price of: " + lowest_price.toFixed(2);
}

var cheapest_plat;
Expand Down

0 comments on commit 2668937

Please sign in to comment.