function addNewPoints(members_id){ var param = Form.serialize("myForm"); var myAjax3 = new Ajax.Request("ViewMembers.php?page=AddNewPoints&id=",{ method: 'post', parameters: param, onSuccess: function(request){ var contents = request.responseText; //check if there was error in text if(contents.match("ERROR") != null){ alert(contents); } showTransLog('','tid'+contents); } }); }