Skip to content

Commit d2165bf

Browse files
committed
updated metadata
1 parent 31c7cb7 commit d2165bf

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
jquery.beforePostBack is a jQuery plugin to subscribe to the postback of an ASP.NET page.
22

3-
ASP.NET won't always raise a 'submit' event (for example with LinkButtons), meaning you can't hook into it. This plugin creates a 'beforePostBack' event and raises it just before the actual post to the server occurs.
3+
ASP.NET won't always raise a 'submit' event (for example with LinkButtons), meaning you can't hook into it. This plugin allows you to execute javascript before the postback happens and optionally stop it. Returning false will stop the postback. Anything else will let the postback continue.
44

55
Usage is easy:
66

77
```javascript
88
$.beforePostBack(function () {
9-
alert('Going to post back!');
9+
if (dontPostback) {
10+
return false;
11+
} else {
12+
alert('Going to post back!');
13+
}
1014
});
1115
```
1216

beforePostBack.jquery.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name" : "beforePostBack",
3-
"version" : "1.0.2",
3+
"version" : "1.1.0",
44
"title" : "A jQuery plugin to add event handlers to ASP.NET's postback.",
55
"author" : {
66
"name" : "Peter Morlion",
@@ -16,7 +16,7 @@
1616
"dependencies" : {
1717
"jquery": ">=1.5"
1818
},
19-
"description" : "This jQuery plugin allows you to subscribe to ASP.NET's postback. Because ASP.NET (WebForms) doesn't raise a submit event, we need another way of subscribing to the postback. This plugin allows you to execute javascript functions before the form is posted to the server.",
19+
"description" : "This jQuery plugin allows you to execute javascript before ASP.NET makes a postback and optionally stop it. Because ASP.NET (WebForms) doesn't raise a submit event, we need another way of subscribing to the postback. This plugin allows you to execute javascript functions before the form is posted to the server.",
2020
"keywords" : [ "asp.net", "postback" ],
2121
"homepage" : "http://github.com/petermorlion/jquery.beforePostBack"
2222
}

0 commit comments

Comments
 (0)