Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82133

require explanation on code snippet

$
0
0
Hi there,

As I try to understand the Join feature from example: http://editor.datatables.net/release/DataTables/extras/Editor/examples/join.html

I look at the js file and see the following code snippet:

"fnInitComplete": function ( settings, json ) {
// Set the allowed values for the select and radio fields based on
// what is available in the database
editor.field('dept.id').update( json.dept );
editor.field('access[].id').update( json.access );
}

If we were to just focus on the "access" option, this presents 6 options for the user: Printers, Servers, Desktop, VMs, Web-site, Accounts.
I don't understand what's happening here. How is it the 6 options are being obtained? Is there a separate query call to the server for the options? I don't see any evidence of it in Firebug. If the options aren't explicitly being set in our javascript code, then I don't see where the information is coming from. I'm kinda sketchy on the use of JQuery as I'm just a newbie at it. I need someone to explain what this code is doing, breaking it down line by line. Please advise.

Alan

Viewing all articles
Browse latest Browse all 82133

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>