snippets / blockContact

Language: Javascript - First posted by willowdan on 2008-05-9 10:18 (1 month, 3 weeks)
Link to the snippet: http://www.friendsnippets.org/snippet/299/

blockContact

 1 function blockContact(fulladd) {
2
3 if (connectionObj.forcedLogout) {
4 isDisconnectedForcedLogout();
5 return false;
6 }
7
8 var selFullAddress = fulladd;
9 var paramBlockContact= 'blockContact='+'&contactID='+selFullAddress;
10
11 new Ajax.Request(contactBlockUrl, {
12
13 method : 'post',
14 onComplete : function(xh) {
15 var output = JSON.parse(xh.responseText);
16
17 if (!connectionObj.forcedLogout) {
18 if (isDisconnectedForcedLogout(output)) {
19 return false;
20 }
21 } else {
22 isDisconnectedForcedLogout(output);
23 return false;
24 }
25
26 if (xh.responseText.toLowerCase().indexOf('error') == -1){
27 blockContactActual(selFullAddress);
28 }
29
30 },
31 onFailure : function(xh) {
32 alert("Oops, there's been an error.");
33 },
34 parameters : paramBlockContact
35
36 });
37
38 }
In order to post a comment, you should have a friendsnippet account. Please sign-in.

0 comments

May '08

Common Tags


Related snippets

0 snippets in relation for now.


snippet History

May '08