I am battling to get my javascript function to fire when a button is clicked on my html page. My html code snippet:
<!DOCTYPE html>
<html>
<head>
<title>VLA SYSTEM</title>
<a href="logout.php" onclick="logout();" style="float:right;">Logout</a>
<script
type ="text/JavaScript" src="logout.js"></script>
</head>
<body>
<form>
<script
type ="text/JavaScript" src="regGen.js"></script>
<script
type="text/JavaScript" src="submit.js"></script>
<input type="button" name="btnAssign" value="Assign Owner To Registration Number..." onclick="submit()">
My javascript code snippet:
function submit() {
window.alert("Information Captured And Stored To Database!");
}
The idea is that, when the user clicks on the button, the alert should fire informing the user that information has been captured, however, I am unable to get this alert to appear.
Any advice would be greatly appreciated.