Refresh page after clicking button (ok / cancel) Refresh page after clicking button (ok / cancel)

i could use some help. I want the page to refresh when someone clicks 'ok' or 'cancel'

Help is appreciated, thanks alot.

This is the code:

Button

<button class="center" type="submit" style="border: 0; background: transparent">
    <img src="Playbutton.png" width="800" height="400" alt="submit" onclick="clicked();" />
</button>

Javascript

<script type="text/javascript">
    function clicked() {
       if (confirm('You just clicked the button, click ok or cancel to refresh.')) {
           yourformelement.submit();
           location.reload();
       } else {
           return false;
       }
    }

</script>


from Stackoverflow

Comments

Popular posts from this blog

\\u0000 cannot be converted to text error \\u0000 cannot be converted to text error

I am having trouble with this ajax timer it is not doing what I expect and does not execute I am having trouble with this ajax timer it is not doing what I expect and does not execute

How to create @click on select menu in VueJS How to create @click on select menu in VueJS