snippets / blockcontact

All snippets tagged blockcontact (1)

  1. blockContact

    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 }
    Posted by willowdan to javascript blockcontact ... saved by 1 person ... 0 comments ... 1 month, 3 weeks
showing 10, 25, 50 items per pages

Pages : 1

Flux RSS friendsnippetLatest snippets


More...