CODEDIGEST InstallShield
Home Articles CodeDigest Tutorials InstallShield FAQs
Skip Navigation LinksHome » CodeDigest » How to alert User when the form is Submitted or Posted to Server using jQuery?   You are not logged in.
Search
 

Sponsors
InstallShield
 

Sponsored Links
 

Technologies
 

CodeDigest Navigation
 

Technology News
No News Feeds available at this time.
 

Community News
No News Feeds available at this time.
 
How to alert User when the form is Submitted or Posted to Server using jQuery?
How to alert User when the form is Submitted or Posted to Server using jQuery?
Submitted By Satheesh Babu
On 1/6/2010 10:19:18 AM
Tags: CodeDigest,jQuery  

How to alert User when the form is Submitted or Posted to Server using jQuery?

 

Sometimes, we require intercepting whenever a page is posted or submitted to the server.
The below jQuery snippet will alert teh user with a confirm box with teh message "Are you sure to continue?" Clicking "Yes" will post the page and "No" will cancel the submit.

 

<head runat="server">

<title></title>

<script src="_scripts/jquery-1.3.2.min.js" type="text/javascript"></script>

<script language="javascript">

$(document).ready(function() {

$("form").submit(function() {

return confirm('Are you sure to continue?');

});

});

</script>


 

 

Do you have a working code that can be used by anyone? Submit it here. It may help someone in the community!!

Recent Codes
  • View All Codes..