HTML and CSS Reference
In-Depth Information
// If they don't exist, throw an exception
throw "Action " + action + " for controller " + controller + " doesn't
appear to exist";
You can access properties within an object much like an array. Except rather
than passing an index, you can pass a string or a variable. For example:
is the same as calling
except you can now use variables to make the call within the brackets in the first
The parameters passed to the controller's action will need to be converted from
a string to a JSON object. You can do this with the JSON.parse() method, as
shown in the following code.
var app = app || {};
app.bootstrap = (function(){
* If there's a target, then process the link action
// Check to see whether the params exist
try {
// If they do, then parse them as JSON
params = JSON.parse(params);
} catch (e) {
* If there's a parsing exception, set the
* params to be null
params = null;
Search WWH ::

Custom Search