Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Further clarifications to the response handling

...

Attribute

Default Value

Description

parseContent

true

When true, Dojo will parse the response into an XHTML Document Object and traverse the nodes searching for Dojo Widget markup. The parse and traversal is performed prior to inserting the nodes into the DOM. This attribute must be enabled to nest Dojo widgets (dojo tags) within responses. Note that there is significant performance overhead creating and parsing There's significant processing involved to create and parse the document so switch this feature off when not required. Note also that the response must be valid XHTML for cross-browser support and widgets must have unique IDs.

separateScripts

true

When true, Dojo will extract the <script> tags from the response, concatenate the extracted code into one block, create a new Function whose body is the extracted code and immediately invoke the function. The invocation is performed after the DOM has been updated with the XHTML. The function is executed within the scope of the widget (that is, the this variable points to the widget instance).

executeScripts

When falseWhen true, Dojo will extract the <script> tags from the response, concatenate the extracted code into one block and immediately perform an eval:
*in IE: invoke window.execScript() on the code
*in other browsers: create a <script> node containing the code and insert that code (run it). The eval() is performed node into the DOM (causing the code to be executed in FF, Safari or Opera)
This invocation occurs after the DOM has been updated . Note that the separateScripts takes precedence over executeScripts. Enable this feature when your response contains TRUSTED inline javascriptwith the XHTML.

executeScripts

false

When true, Dojo will extract code from the <script> tags from the response and execute it based on the separateScripts value.
When false, the XHTML response is inserted into the DOM and <script> nodes are ignored.

Note

It's common possible that the updated DOM may will not include <script> tags nodes even though the inline code may have been executedhas been executed.

Tip

Ensure the inline javascript can be concatenated and executed after the DOM updates. Ensure the response is XHTML-compliant (including, for example, thead and tbody tags in tables).

Topics

Most of the AJAX tags use Dojo topics for event notification and communication between them, to learn about topics visit Dojo's documentation

...