0

When I visit a new page on my HTML site, and it's still loading, the user should be able to click a button and then the button works even though the page still loads. Because right now, when the page loads, the user clicks the button, and when the page is done loading the click activates. I guess i should use some kind of cancel page load, on input click (I have to submit FORM too). But can/how can this be done?

echo'
<form action="" method="POST">              
<input type="submit" value="Show Saved Features" name="Hide" class="btn btn-info ChangeFeature indexLink_Buttons4"/>
</form> 
';
Mads
  • 61
  • 1
  • 8
  • Take a look at: https://stackoverflow.com/questions/7056669/how-to-prevent-default-event-handling-in-an-onclick-method – Richard Apr 07 '20 at 08:32
  • Does this answer your question? [How to prevent default event handling in an onclick method?](https://stackoverflow.com/questions/7056669/how-to-prevent-default-event-handling-in-an-onclick-method) – Nick Edwards Apr 08 '20 at 02:11

1 Answers1

0

I think you should use ajax, take a look at: jquery_ajax_get_post

Sam HLIV
  • 1
  • 2