Page/View Background not blurring
<p>I have a link within my View and when users click on that link the following JS file executes.  What I am trying to do is to disable or sort of blur out the background when the dialog box is open. I know there are specific plug-ins for that for example BlockUI but I saw this example <a href="http://jsfiddle.net/tctc2/105/" rel="nofollow">http://jsfiddle.net/tctc2/105/</a> and it works fine. I used the same logic but my page background does not blur out.</p>

<p><strong>JS file for the dialog box:</strong></p>

<pre><code>var RunDialog;

$(document).ready(function () {

    RunDialog = $("#runDatestreeview").dialog({ resizable: false, autoopen: false, height: 140, modal: true, width: 630, height: 400,
        buttons: { "Continue": function () {
            $.post("/RunLogEntry/Create", $("#form").serialize(), function (json) {

            }, "json");
        },
            Cancel: function () {
                $(this).dialog("close");
            }
        }
    });

    $('#RunDatesChildDialogLink').click(function () {
        RunDialog.dialog('open');
        $("#runDatestreeview").parent().appendTo("form");
        return false;
    });

    $("#runDatestreeview").parent().appendTo("form");

});
</code></pre>

<p><strong>VIEW:</strong></p>

<p>The div in question is: runDatestreeview and the link which opens this dialogbox is right above it in the following:</p>

<pre><code>&lt;fieldset&gt;
    &lt;legend&gt;Enter a new Run Log Entry&lt;/legend&gt;
    @using (Html.BeginForm("Create", "RunLogEntry", FormMethod.Post, new { id = "form", enctype = "multipart/form-data" }))
    {

        @*&lt;div id="test"&gt;*@
            @Html.ValidationSummary(true)
            &lt;div class="exception"&gt;@(ViewBag.ErrorMessage)&lt;/div&gt;
            &lt;div class="bodyContent"&gt;
                &lt;span class="leftContent"&gt;Load List File (Select): &lt;/span&gt;&lt;span class="rightContent"&gt;
                    &lt;input type="file" name="file" id="file1" style="width: 500px" /&gt;
                &lt;/span&gt;
            &lt;/div&gt;
            if (Model.LoadListStoredFileName != null) {
            &lt;div class="bodyContent"&gt;
                &lt;span class="leftContent"&gt;Attached Load List: &lt;/span&gt;&lt;span class="rightContent"&gt;
                    @Html.ActionLink(Model.LoadListFileName, "Download", new { @file = Model.LoadListStoredFileName })
                &lt;/span&gt;
            &lt;/div&gt;
            }
            &lt;div class="bodyContent"&gt;
                &lt;span class="leftContent"&gt;Output File (Select): &lt;/span&gt;&lt;span class="rightContent"&gt;
                    &lt;input type="file" name="file" id="file2" style="width: 500px" /&gt;
                &lt;/span&gt;
            &lt;/div&gt;
            if (Model.OutputStoredFileName != null) {
            &lt;div class="bodyContent"&gt;
                &lt;span class="leftContent"&gt;Attached Output: &lt;/span&gt;&lt;span class="rightContent"&gt;
                    @Html.ActionLink(Model.OutputFileName, "Download", new { @file = Model.OutputStoredFileName })
                &lt;/span&gt;
            &lt;/div&gt;
            }
            &lt;div class="bodyContent"&gt;
                &lt;span class="leftContent"&gt;.LOG File(s) -Zip: &lt;/span&gt;&lt;span class="rightContent"&gt;
                    &lt;input type="file" name="file" id="file3" style="width: 500px" /&gt;
                &lt;/span&gt;
            &lt;/div&gt;
            &lt;div class="bodyContent"&gt;
                &lt;span class="leftContent"&gt;Import Files: &lt;/span&gt;
                &lt;button name="submit" class="art-button" type="submit" value="Upload" style="width: 100px"&gt;
                    Upload&lt;/button&gt;
                &lt;button name="submit" class="art-button" type="submit" value="Remove" style="width: 100px"&gt;
                    Remove&lt;/button&gt;
            &lt;/div&gt;
            &lt;div class="bodyContent"&gt;
                &lt;span class="leftContent"&gt;
                    @Html.Label("Operator")
                &lt;/span&gt;&lt;span class="rightContent"&gt;
                    @Html.DropDownList("OperatorID", String.Empty)
                &lt;/span&gt;
            &lt;/div&gt;
            &lt;div class="bodyContent"&gt;
                &lt;span class="leftContent"&gt;
                    @Html.Label("Run ID")
                &lt;/span&gt;&lt;span class="rightContent"&gt;[Generated] &lt;/span&gt;
            &lt;/div&gt;
            &lt;div class="bodyContent"&gt;
                &lt;span class="leftContent"&gt;
                    @Html.Label("Run Start Date / Time")
                &lt;/span&gt;&lt;span class="rightContent"&gt;
                    @Html.EditorFor(model =&gt; model.RunDate)
                    &amp;nbsp;
                    @Html.DropDownList("Hour", ListHelpers.HourList())
                    :
                    @Html.DropDownList("Minute", ListHelpers.Minute15List())
                    &amp;nbsp;
                    @Html.DropDownList("AMPM", ListHelpers.AMPMList())
                &lt;/span&gt;
            &lt;/div&gt;
            &lt;div class="bodyContent"&gt;
                &lt;span class="leftContent"&gt;
                    @Html.Label("System")
                &lt;/span&gt;&lt;span class="rightContent"&gt;
                    @Html.DropDownList("SystemID", String.Empty)
                &lt;/span&gt;
            &lt;/div&gt;
            &lt;div class="bodyContent"&gt;
                &lt;span class="leftContent"&gt;
                    @Html.Label("Run Type")
                &lt;/span&gt;&lt;span class="rightContent"&gt;
                    @Html.DropDownList("RunTypeID", String.Empty)
                &lt;/span&gt;
            &lt;/div&gt;
            &lt;div class="bodyContent"&gt;
                &lt;span class="leftContent"&gt;
                    @Html.Label("Run Description")
                &lt;/span&gt;&lt;span class="rightContent"&gt;
                    @Html.TextAreaFor(model =&gt; model.RunDescription, new { style = "width: 600px; height=30px" })
                &lt;/span&gt;
            &lt;/div&gt;
            &lt;div class="bodyContent"&gt;
                &lt;span class="leftContent"&gt;
                    @Html.Label("Assay Performance Issues")
                &lt;/span&gt;&lt;span class="rightContent"&gt;
                    @Html.DropDownList("AssayPerformanceIssues1", ListHelpers.YesNoList())
                &lt;/span&gt;
            &lt;/div&gt;
            &lt;div class="bodyContent"&gt;
                &lt;span class="leftContent"&gt;
                    @Html.Label("Tests/Cycles Requested")
                &lt;/span&gt;&lt;span class="rightContent"&gt;
                    @Html.EditorFor(model =&gt; model.SPTestsRequested)
                &lt;/span&gt;
            &lt;/div&gt;
            &lt;div class="bodyContent"&gt;
                &lt;span class="leftContent"&gt;
                    @Html.Label("Tests/Cycles Completed")
                &lt;/span&gt;&lt;span class="rightContent"&gt;
                    @Html.EditorFor(model =&gt; model.SPTestsCompleted)
                &lt;/span&gt;
            &lt;/div&gt;
            &lt;div class="bodyContent"&gt;
                &lt;span class="leftContent"&gt;
                    @Html.Label("Run Status")
                &lt;/span&gt;&lt;span class="rightContent"&gt;
                    @Html.DropDownList("RunStatusID", String.Empty)
                &lt;/span&gt;
            &lt;/div&gt;
            &lt;div class="bodyContent"&gt;
                &lt;span class="leftContent"&gt;
                    @Html.Label("Assay")
                &lt;/span&gt;&lt;span class="rightContent"&gt;
                    @Html.ListBoxFor(model =&gt; model.SelectedAssayIDs, new MultiSelectList(RunLog.Domain.Lists.GlobalList.AssayListItems(), "ID", "Name", Model.SelectedAssayIDs))
                &lt;/span&gt;
            &lt;/div&gt;
            &lt;div class="bodyContent"&gt;
                &lt;span class="leftContent"&gt;
                    @Html.Label("Error Code")
                &lt;/span&gt;&lt;span class="rightContent"&gt;&lt;span id="ChildDialogLink" class="treeViewLink"&gt;Click
                    here to Select Error Codes&lt;/span&gt;
                    &lt;br /&gt;
                    &lt;span id="ErrorCodeDisplay" style="cursor: pointer; text-decoration: underline;"&gt;@(Model.ErrorDescription)&lt;/span&gt;
                    @Html.HiddenFor(model =&gt; model.ErrorDescription)
                &lt;/span&gt;
            &lt;/div&gt;
            &lt;div class="bodyContent"&gt;
                @if (Model.TestExceptionDisplay != null &amp;&amp; Model.TestExceptionDisplay.Count() &gt; 0)
                {
                    &lt;span class="leftContent"&gt;
                        @Html.Label("Test Exceptions")
                    &lt;/span&gt;&lt;span class="rightContent"&gt;&lt;span id="TestExceptionChildDialogLink" class="treeViewLink"&gt;
                        Click here to View Test Exceptions&lt;/span&gt;
                        &lt;br /&gt;
                        &lt;span id="TestExceptionDisplayy"&gt;&lt;/span&gt;&lt;/span&gt;
                }
            &lt;/div&gt;
            &lt;div id="testExceptiontreeview" title="Dialog Title" style="font-size: 10px; font-weight: normal;
                overflow: scroll; width: 800px; height: 450px; display: none;"&gt;
                &lt;table class="grid" style="width: 600px; margin: 3px 3px 3px 3px;"&gt;
                    &lt;thead&gt;
                        &lt;tr&gt;
                            &lt;th&gt;
                                Exception
                            &lt;/th&gt;
                            &lt;th&gt;
                                Frequency
                            &lt;/th&gt;
                            &lt;th&gt;
                                Comment
                            &lt;/th&gt;
                            &lt;th&gt;
                                Replicate Range
                            &lt;/th&gt;
                        &lt;/tr&gt;
                    &lt;/thead&gt;
                    &lt;tbody&gt;
                        @if (Model.TestExceptionDisplay != null)
                        {
                            @Html.EditorFor(x =&gt; x.TestExceptionDisplay)
                        }
                    &lt;/tbody&gt;
                &lt;/table&gt;
            &lt;/div&gt;
            @*test div end here*@
        @*&lt;/div&gt;*@
        &lt;div class="bodyContent"&gt;
            &lt;span class="leftContent"&gt;
                @Html.Label("Run Dates")
            &lt;/span&gt;&lt;span class="rightContent"&gt;&lt;span id="RunDatesChildDialogLink" class="treeViewLink"&gt;
                Click here to Select Run Dates&lt;/span&gt;
                &lt;br /&gt;
                &lt;span id="RunDatesDisplayy"&gt;&lt;/span&gt;&lt;/span&gt;
        &lt;/div&gt;
        &lt;div id="runDatestreeview" title="Dialog Title" style="font-size: 10px; font-weight: normal;
            overflow: scroll; width: 800px; height: 450px; display: none;"&gt;
            &lt;table class="grid" style="width: 600px; margin: 3px 3px 3px 3px;"&gt;
                &lt;thead&gt;
                    &lt;tr&gt;
                        &lt;th&gt;
                            Run Dates:
                        &lt;/th&gt;
                    &lt;/tr&gt;
                &lt;/thead&gt;
                &lt;tbody&gt;
                    @Html.EditorFor(x =&gt; x.RunDatesDisplay)
                &lt;/tbody&gt;
            &lt;/table&gt;
        &lt;/div&gt;
        &lt;div class="bodyContent"&gt;
            &lt;span class="leftContent"&gt;
                @Html.Label("Service Entry Request")
            &lt;/span&gt;&lt;span class="rightContent"&gt;
                @Html.DropDownList("ServiceRequest", ListHelpers.YesNoList())
            &lt;/span&gt;
        &lt;/div&gt;
        &lt;div class="bodyContent"&gt;
            &lt;span class="leftContent"&gt;
                @Html.Label("Problem Description")
            &lt;/span&gt;&lt;span class="rightContent"&gt;
                @Html.TextArea("ProblemDescription", new { style = "width: 600px; height: 30px" })
            &lt;/span&gt;
        &lt;/div&gt;
           if (Model.UserRole == "Admin" || Model.UserRole == "SuperUser")
           {
        &lt;div class="bodyContent"&gt;
            &lt;span class="leftContent"&gt;
                @Html.Label("Active")
            &lt;/span&gt;&lt;span class="rightContent"&gt;
                @Html.CheckBoxFor(model =&gt; model.Active)
            &lt;/span&gt;
        &lt;/div&gt;
           }
           else
           {
        @Html.HiddenFor(model =&gt; model.Active)
           }
        &lt;p&gt;
            &lt;input id="LogType" type="hidden" value="Run" /&gt;
            &lt;input id="ID" type="hidden" value="0" /&gt;
            @if (Model.ExitCode == "1")
            {
                @Html.Hidden("ExitCode", Model.ExitCode)
            }
            else
            {
                &lt;input id="ExitCode" type="hidden" value='0' /&gt;
            }
        &lt;/p&gt;
        @Html.HiddenFor(model =&gt; model.MaxReplicateId)
        @Html.HiddenFor(model =&gt; model.MinReplicateId)
        @Html.HiddenFor(model =&gt; model.OutputFileName)
        @Html.HiddenFor(model =&gt; model.OutputStoredFileName)
        @Html.HiddenFor(model =&gt; model.LoadListFileName)
        @Html.HiddenFor(model =&gt; model.LoadListStoredFileName)
        @Html.HiddenFor(model =&gt; model.MinTestCompletionDate)
        @Html.HiddenFor(model =&gt; model.MaxTestCompletionDate)
        @Html.HiddenFor(model =&gt; model.UserRole)
        @Html.HiddenFor(model =&gt; model.Active)
        @Html.HiddenFor(model =&gt; model.ReplicateBlocksConfirmation)
        &lt;div class="bodyContent"&gt;
            &lt;span class="leftContent"&gt;&lt;/span&gt;&lt;span class="rightContent"&gt;
                &lt;button id="submit" name="submit" class="art-button" type="submit" value="Create"&gt;
                    Create&lt;/button&gt;&lt;/span&gt;
        &lt;/div&gt;

    }
&lt;/fieldset&gt;
&lt;script src="@Url.Content("~/Scripts/exitCode.js")" type="text/javascript"&gt;&lt;/script&gt;
&lt;div id="treeview" title="Dialog Title" style="font-size: 10px; font-weight: normal;
    overflow: scroll; width: 800px; height: 450px;"&gt;
    &lt;div id="errorCodes"&gt;
        @Html.RenderTree(CacheHelper.ErrorCodes(), ec =&gt; ec.Name, ec =&gt; ec.Children.ToList(), ec =&gt; (ec.ID).ToString(), null, "e")
        @* @Html.RenderTree(RunLog.Domain.Lists.GlobalList.ErrorCodes(), ec =&gt; ec.Name, ec =&gt; ec.Children.ToList(), ec =&gt; (ec.ID).ToString(), null, "e")

  *@
    &lt;/div&gt;
    &lt;div id="inputReps" style="display: none;"&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>
