Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have never used JQuery's load method. But I have done similar dynamic content loading (mostly in drop downs) using Web-service calls with the JQuery Ajax method to get the data I needed.</p> <p>You could probably get the data using a web-service call with as many parameters as you need and then use load on the result to dynamically populate what you need.</p> <p>Like I said I have never used the load method so I might be completely off on how it works, but that is just my two cents.</p> <p>Edit: On another note the Ajax method runs asynchronously so you can be loading multiple sets of dynamic content through web-service calls at the same time.</p> <p>Edit 2: As per discussion, here is the wrapper function for the standard JQuery Ajax function. To use it simply pass your method name as a string, parameters as an object (example: var parameters = [ param1: 'hello'], make sure param1 matches the web method parameter name exactly), and the function you want called on success (must accept a single parameter that is the returned data). This function may need to change based on your web-service setup.</p> <pre><code>function makeWsCall(methodNameVar, paramatersVar, successFunc) { jQuery.support.cors = true; // force cross-site scripting (as of jQuery 1.5) $.ajax({ url: '&lt;%=postUrlCodeBehind%&gt;' + "/" + methodNameVar, // url + method name type: 'GET', // http request type data: paramatersVar, // paramaters to be passed to the ws ContentType: "application/json; charset=utf-8", dataType: 'json', // expected return type //traditional: true, // dataType: 'jsonp', timeout: 200000, // timeout, may not be needed success: function (data) { var returnObject = eval(data); successFunc(returnObject); // call the function passed to the method }, //successFunc(data), error: function (data) { // on error method // do nothing on error } }); }; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload