Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.FuncName = function (variable) {
- $.ajax(
- {
- type: "POST",
- url: '/.../...',
- data: function(variable) {
- var obj = { field1: null, field2: null };
- if (variable) {
- obj.field1 = value1;
- obj.field2 = value2;
- } else {
- obj.field1 = value3;
- obj.field2 = value4;
- }
- JSON.stringify(obj);
- },
- ...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement