Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Ajax(urlstring) {
- var res = new Object();
- var res = $.ajax({
- beforeSend: function() {
- $('#Processing').show();
- },
- type: 'POST',
- url: urlstring,
- dataType: 'text',
- async: false,
- complete: function() {
- $('#Processing').hide();
- }
- });
- var ress = new Object();
- var data = res.responseText;
- var obj = jQuery.parseJSON(data);
- if (obj.State = 'Succes') {
- if (typeof obj.result != 'undefined') {
- ress[result] = obj.result;
- } else {
- for (var prop in obj) {
- if(obj.hasOwnProperty(prop)){
- ress[prop] = obj[prop];
- }
- }
- }
- }
- return ress;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement