Widget:YieldCalc: Difference between revisions

From Ara: History Untold Wiki
No edit summary
No edit summary
Line 14: Line 14:


<script type="text/javascript">
<script type="text/javascript">
// Prevent Submit button from reloading page
foodYieldForm.addEventListener("submit", (event) => {
foodYieldForm.addEventListener("submit", (event) => {
   event.preventDefault();
   event.preventDefault();
});
});


/* Yield Calculator */
// Yield Calculator
function yieldScript(){   
function yieldScript(){   
let a = document.getElementById("cityProd").value; /* City Production */
let a = document.getElementById("cityProd").value; /* City Production */

Revision as of 22:50, 24 October 2024

This widget is used to display and calculate the yield with the values submitted by the user.

Usage: ‎{{#Widget:YieldCalc}}