User1203305613 posted
Hi All,
I am coding a small Calorie Calculator using Apache Cordova (HTML5 ,JS), on click I want to call a JS function which is not inline(its a separate library ) that wouldn't work .
</head>
<body>
<div data-role="page" id="weather-page">
<div data-role="header" class="header">
<h1 id="app-title">Weather App</h1>
<a href="/" class="ui-btn ui-btn-left ui-btn-corner-all ui-icon-home ui-btn-icon-notext" rel="external">Home</a>
</div>
<div role="main" class="ui-content">
<form>
<label for="Weight">Type your Weight:</label>
<input id="Weight-input" type="number" name="weight" placeholder="In Kgs" min="40" max="120" required /> <br />
<label for="Height">Type your Height:</label>
<input id="Height-input" type="number" name="height" placeholder="In cms" min="80" max="210" required /> <br />
<label for="Age ">Type your Age :</label>
<input id="Age-input" type="number" name="age" min="12" max="80" required /> <br />
<input type="radio" name="gender" value="male" checked> Male<br>
<input type="radio" name="gender" value="female"> Female<br>
<button id="get-weather-btn" data-role="button" onclick="Calc()" data-icon="search">Find Daily Calories</button>
</form>
</div>
<script type="text/javascript" src="scripts/Calcscript.js"></script>
</body>
</html>
--------------------
Calcscript.js file
-------------------
function Calc()
{
console.log("Hicalc");
return true;
}