Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><code>options.html</code> requires a HTML DOM element instead of plain HTML code:</p> <pre><code>&lt;script&gt; function ShowDialog() { var htmlElement = document.createElement('p'); var helloWorldNode = document.createTextNode('Hello world!'); htmlElement.appendChild(helloWorldNode); var options = { html: htmlElement, autoSize:true, allowMaximize:true, title: 'Test dialog', showClose: true, }; var dialog = SP.UI.ModalDialog.showModalDialog(options); } &lt;/script&gt; &lt;a href="javascript:ShowDialog()"&gt;Boo&lt;/a&gt; </code></pre> <p>Example code taken from the blog post <a href="http://www.neilrichards.net/general/rendering-html-in-a-sharepoint-dialog-requires-a-dom-element-and-not-a-string" rel="nofollow noreferrer">Rendering html in a SharePoint Dialog requires a DOM element and not a String</a>.</p> <blockquote> <p>also related to this, what does SP.UI.$create_DialogOptions() actually do? what is the difference between using it and simply using a dict of values for your options</p> </blockquote> <p>When you look at the definition of the <code>SP.UI.DialogOptions</code> "class" in the file <em>SP.UI.Dialog.debug.js</em> you see that its a empty javascript function.</p> <pre><code>SP.UI.DialogOptions = function() {} SP.UI.$create_DialogOptions = function() {ULSTYE:; return new SP.UI.DialogOptions(); } </code></pre> <p>My guess is that it is there for client diagnostic purpose. Take a look at this SO question: <a href="https://stackoverflow.com/questions/4177001/what-does-this-javascript-code-do">What does this Javascript code do?</a></p>
    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