0

I have this line of javascript in my code

alertify.alert("<div class='alert'>Some speech</div>");

I would like to reload the index.html page after clicking "ok"

Is it possible without going on alertify.confirm?

Gary
  • 13,303
  • 18
  • 49
  • 71
  • http://jsfiddle.net/nyitsol/g2o52zq7/14/ Please show us what you tried already! – Rahman Aug 20 '15 at 12:22
  • you can go through this [link1][1] or [link2][2] [1]: http://stackoverflow.com/questions/3682805/javascript-load-a-page-on-button-click [2]: http://stackoverflow.com/questions/15719729/i-want-to-load-another-html-page-after-a-specific-amount-of-time – Shasha Aug 20 '15 at 12:30
  • What about this: http://jsfiddle.net/46xc9qny/1/ ? – Quentin Roy Aug 20 '15 at 12:32
  • without a callback function you wont see the dialog, i think the examples help him – Rahman Aug 20 '15 at 12:38

1 Answers1

3

Well, You can use this code to achieve what you want:

alertify.alert("This is an alert dialog.", function(){
    location.reload();
});

Below is the link to the demo: http://jsfiddle.net/5HygY/67/

I hope this helps.

shet_tayyy
  • 5,366
  • 11
  • 44
  • 82