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

How can I get every LI element's innerHTML and display as string? How can I get every LI element's innerHTML and display as string?

Selenium: Cannot click element Selenium: Cannot click element

Full text search does not find some specific words, which not included in stop words Full text search does not find some specific words, which not included in stop words