Reputation: 17
So I have a submit form and want an alarm that pops up after the user send the form.
Heres the part of code that's not working for me
HTML
<div class="col-md-12">
<input onclick="formSuc" type="submit" class="btn btn-box" value="ABSENDEN">
</div>
<script>
function formSuc(){
alarm("test");
}
</script>
Upvotes: 0
Views: 1606
Reputation: 32002
Use parenthesis when calling a function:
<div class="col-md-12">
<input onclick="formSuc()" type="submit" class="btn btn-box" value="ABSENDEN">
</div>
<script>
function formSuc() {
alert("test");
}
</script>
Upvotes: 2