How to display a simple dialog in SharePoint 2010 without breaking the page?
<p>I've worked on this for several hours today and am getting no where. Hoping someone can step in and please help. </p>

<p>All I want to do is display a simple message in a pop up dialog to tell users of some changes coming to a SharePoint 2010 site. I never thought this would be so difficult!</p>

<p>I've gone through a dozen links from a Google search but nothing has helped. </p>

<p>The only thing that sort of works is this code that I put into a Content Editor Web Part: </p>

<pre><code>&lt;script type="text/javascript"&gt;
    function codeAddress() {
        alert('ok');
        var options = {

            Title: "Survey",

            height: 500

        };
        _spBodyOnLoadFunctionNames.push("codeAddress");
    }
    window.onload = codeAddress;
&lt;/script&gt;
</code></pre>

<p><strong>But</strong>, the problem with this code is that after I click Ok, the page behave strangely. The java script of the page does not work, and even editing the page is messed up until I delete the webpart with the code. </p>

<p>I suspect that the problem has to do with this: </p>

<pre><code>_spBodyOnLoadFunctionNames.push
</code></pre>

<p>But if I remove it then the pop up does not work. </p>

<p>In case it's not clear, <strong>my goal is</strong> to show any type of dialog in which I can type a sentence or two to tell the user something. Then they can click OK and give full control back to the page.  </p>

<p>Please please someone help!</p>