Advertisement
Guest User

Untitled

a guest
Sep 15th, 2014
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. this.FuncName = function (variable) {
  2. $.ajax(
  3.                 {
  4.                     type: "POST",
  5.                     url: '/.../...',
  6.                     data: function(variable) {
  7.                         if (variable) {
  8.                 JSON.stringify({ field1: value1, field2: value2 }),
  9.             } else {
  10.                 JSON.stringify({ field1: value3, field2: value4 }),
  11.             }
  12.                     },
  13.             ...
  14.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement