0

I have created two buttons that lead to the NewForm.aspx pages I have linked to the buttons. The one link works like a charm, the other link has the correct web address but when the button is clicked, it just refreshes the page it was just on. Why is this?

I have tried debugging and nothing pops up in the console.

1
  • Are you using classic experience or modern? Can you please add the code you are using to your question? Commented Oct 23, 2020 at 15:30

1 Answer 1

1

As per my understanding (Correct me if I am wrong), you forgot to add the type="button" to your button element.

So, Add type="button" to the button.

<button type="button" onclick="yourFunction()">Click Here</button>

Reference: prevent refresh of page when button inside form clicked

Also, it will be easier to answer your question more precisely by looking at at the code you are using currently. Can you please add the code you are using to your question?

0

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.