0

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>

1 Answer 1

2

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>

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.