CLIENT GUI Framework
[vnfsdk/refrepo.git] / portal-common / src / main / webapp / common / thirdparty / zTree / api / en / setting.async.otherParam.html
1 <div class="apiDetail">\r
2 <div>\r
3         <h2><span>Array(String) / JSON</span><span class="path">setting.async.</span>otherParam</h2>\r
4         <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>\r
5         <div class="desc">\r
6                 <p></p>\r
7                 <div class="longdesc">\r
8                         <p>The static parameters of the Ajax request. (key - value) It is valid when <span class="highlight_red">[setting.async.enable = true]</span></p>\r
9                         <p>Default: [ ]</p>\r
10                 </div>\r
11         </div>\r
12         <h3>Array(String) Format</h3>\r
13         <div class="desc">\r
14         <p>Can be empty array. e.g. [ ].  If set key, you must set value, e.g. [key, value]. ([key] or [key, value, key] is wrong!!)</p>\r
15         </div>\r
16         <h3>JSON Format</h3>\r
17         <div class="desc">\r
18         <p>Use JSON data format set the key-value. e.g. { key1:value1, key2:value2 }</p>\r
19         </div>\r
20         <h3>Examples of setting</h3>\r
21         <h4>1. Use Array(String) Format</h4>\r
22         <pre xmlns=""><code>var setting = {\r
23         async: {\r
24                 enable: true,\r
25                 url: "http://host/getNode.php",\r
26                 otherParam: ["id", "1", "name", "test"]\r
27         }\r
28 };\r
29 when zTree send ajax, the parameters will has: id=1&name=test</code></pre>\r
30         <h4>2. Use JSON data Format</h4>\r
31         <pre xmlns=""><code>var setting = {\r
32         async: {\r
33                 enable: true,\r
34                 url: "http://host/getNode.php",\r
35                 otherParam: { "id":"1", "name":"test"}\r
36         }\r
37 };\r
38 when zTree send ajax, the parameters will has: id=1&name=test</code></pre>\r
39 </div>\r
40 </div>