I have a meteor app with a <button>
. The button has an onclick
event on it that calls a function verifypwd()
. My function is declared in a file named verifypwd.js which is in the main directory of the app. When I click my button, it tells me it can't find the function. What's wrong?
Here's my code:
HTML
<head>
<title>KinnockPass</title>
<script src="verifypwd.js"></script>
</head>
<body>
</body>
<template name="PPRO">
<div class="vertibox">
<div id="authorization-box">
<div id="authorization">
<h1>Are you a Riley?</h1>
<input id="password" type="password"/>
<button id="password-submit" onclick="verifypwd();">Yes, I Am.</button>
</div>
</div>
</div>
</template>
<template name="passed">
</template>
Main JS File
//Define Route of PPRO Template
Router.route('/', {template: 'PPRO'});
Router.route('/passed');
pwd = new Mongo.Collection("pwd");
verifypwd.js
var verifypwd = function(){
console.log("Hello");
}