Jump to content

  • Free consultations and support
  • Live chatClick Here for Live Chat
  • Call ico 1888-906-1888
    Phone support: Open

    Ready for your call :)

    Our business hours:

    Mon — Fri, 2am — 8pm (EST)

    US & EU support teams

    Phone support: Closed

    We are back in: 1h 20m

    Our business hours:

    Mon — Fri, 2am — 8pm (EST)

    US & EU support teams

JavaScript Confirm

javascript confirm

  • Please log in to reply

#1 SmartWeb


    Senior Member

  • Designer
  • 271 posts

Posted 27 February 2013 - 02:55 PM

JavaScript confirm function is similar to the JavaScript alert function, where a small dialogue box displays by popping up in front of the web page currently in focus. The confirm box is however, supplies the user with a number choice to chose from. They can click OK to confirm or they can press cancel.
Confirmation are usually used to confirm any important actions that will take place on a website.

<script type="text/javascript">

function confirmation() {
var answer = confirm("Leave ThisSite.com?")
if (answer){
alert("See you soon!")
window.location = "http://www.google.com/";
alert("Stay Around!")

<input type="button" onclick="confirmation()" value="Leave This website.com">

#2 pandor



  • Designer
  • 59 posts

Posted 18 March 2013 - 06:12 PM

Nice...That's what I was looking for...thanks

#3 mohitji


    Junior Member

  • Designer
  • 10 posts

Posted 03 May 2013 - 02:17 PM


#4 ptu12


    Senior Member

  • Designer
  • 238 posts

Posted 27 February 2014 - 10:23 PM

Thank for sharing. But most people feel annoying with it.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users