Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think your immediate problem is that you don't have a # in front of unloadPic in your selector up top, when you are creating the dialog. It doesn't know what you are trying to select, thus never creates the dialog.</p> <p>Also, if you are using jQuery, why not attach a click handler for your <code>dialog()</code> using jQuery?</p> <pre><code>&lt;map name="Map"&gt; &lt;area id="myAlerts" shape="rect" coords="225,16,287,33" href="/_layouts/MyAlerts.aspx" alt="My Alerts" /&gt; &lt;/map&gt; </code></pre> <p>Note that to your <code>area</code> tag you need to include an <code>id</code>, as well as, add the <code>/</code> in front of the <code>&gt;</code> to properly close the tag, which you don't have.</p> <p>This is what I use and I have modified it for your example:</p> <pre><code>(function($, window, document, undefined) { // grab dialog and area var $dialog = $("#uploadPic"), $myAlerts = $("#myAlerts"); // attach click handler $myAlerts.click(function(e) { // prevent default click action e.preventDefault(); // if dialog exists, unbind and open if ($dialog.length) $dialog.unbind().dialog('open'); }); // added to re-center dialog when window re-sizes $(window).resize(function() { if ($dialog.length &amp;&amp; $dialog.dialog('isOpen')) $dialog.dialog('option', 'position', 'center'); }); })(jQuery, this, document); </code></pre> <p><strong>EDIT:</strong></p> <p>I would also add that since you are using MasterPages, I'd definitely make sure you are adding the <code>onLoadFunction()</code> via:</p> <pre><code>if (Sys != undefined &amp;&amp; Sys.Application) { // add to Application object Sys.Application.add_load(onLoadFunction); } else { // fall back to adding to window.onload window.onload = onLoadFunction(); } </code></pre> <p>I see the <code>_spBodyOnLoadFunctionNames.push("onloadFunction");</code>, but I'm not sure what exactly that does. I would assume it does what it should.</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. This table or related slice is empty.
    1. 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