SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru mmarif4u's Avatar
    Join Date
    Dec 2006
    Location
    /dev/swat
    Posts
    619
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Confirm popup msg

    Hi guys,,
    This is simple but i want ot know that
    how to make popup msg in javascript when a user click on the submit button..
    For confirmation if the user click on submit then 1st popup msg appear
    that say(R u sure) on click ok 2nd popup msgbox appear that say
    (Reconfirm the form).if user click ok ,data store into database, but if click
    on cancel back to the main page from where he click the submit button.

    Thanks in advance...

  2. #2
    SitePoint Evangelist SpaceFrog's Avatar
    Join Date
    Jan 2005
    Location
    Outerspace
    Posts
    511
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    var sure=confirm('are you sure ?')

  3. #3
    SitePoint Guru mmarif4u's Avatar
    Join Date
    Dec 2006
    Location
    /dev/swat
    Posts
    619
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Plz dont mind can u explain it with more complete code,where
    to put it.
    bcoz i have already php script for that page.
    Thanks

  4. #4
    SitePoint Member
    Join Date
    Jan 2007
    Location
    Cologne, Germany
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    function doubleConfirm()
    {
      if (!confirm('R u sure')) return false;
      if (!confirm('Reconfirm the form')) return false;
      return true;
    }
    
    <form onsubmit="return doubleConfirm()"....

  5. #5
    SitePoint Guru mmarif4u's Avatar
    Join Date
    Dec 2006
    Location
    /dev/swat
    Posts
    619
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for help..
    its working fine..


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •