0

As a continuation to as written here : Click on a button pauses other function interval

I've realized that clicking on a button / calling a JS function causes a postback, and it might be the reason that it is not possible to do them both together.

Is there any way to prevent this postback ?

Nadlir
  • 15
  • 6

1 Answers1

0

You can try the following to stop the postback...

<asp:Button runat="server" ID="UpdatePlayersInPartyBTN" OnClientClick="javascript: return false;" onclick="UpdatePlayersInParty" />

Or

You can remove the runat server if you don't need it.

  • Why does return false would stop the postback action ? I've tried doing as you suggested, and the postback stopped, and so is the counter, it is just stuck on 0. – Nadlir Jun 20 '20 at 20:47