I am trying to call a javascript fuction from a javascript file in my project directory using an input type submit, but the button is not working. Here is the code:
<form asp-controller="ContractMgts" asp-action="WrkContractMgt" method="post">
<p>
<label>Credentials </label><br />
<input type="text" id="IpString" size="100" value="" /><br /><br />
<input type="submit" id="submitButton" value="Credentialize" class="btn btn-primary" onclick="callMyCredentializeFunction()"/><br /><br /><br />
<a asp-controller="CustomerRegistrations" asp-action="CustomerRegistration"> Begin credentialisation by registering as a customer!</a>
</p>
</form>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
<script src="js/WrkContract.js"></script>
<script>
// Call the function when needed, for example, on a button click
function callMyCredentializeFunction() {
Credentialize();
}
</script>
}