I've been struggling to get some Javascript to work on a Razor View page, but for some reason it's not being activated. Any help would be greatly appreciated!
Just a heads up: The View has a shared layout that loads jQuery & Bootstrap for all views.
Below is my most recent Razor View code in an attempt to activate the textSubmit() function. I've tried various methods like using the button onclick() tag, the form onsubmit() event, and more, but nothing seems to be working!
<script type="text/javascript">
$("#submit").click(function (event) {
event.preventDefault();
textSubmit();
});
function textSubmit() {
alert("You CLICKED!");
}
</script>
<div id="workarea">
<div id="emptylog"></div>
<div id="chatbox">
<form id="inputForm" role="form">
<div class="form-group">
<label for="inputBox">Say something:</label>
<input name="inputBox" id="inputBox" type="text" class="form-control" required>
</div>
<button id="submit" type="button" class="btn btn-default btn-primary">Submit</button>
</form>
</div>
</div>