add data to a dialog

add data to a dialog

I have a ajax response from a web service at here, I want to display it in the dialog but it is not working.
Basically I input a text in the textbox and click the button.
  1. <script type="text/javascript">
             $(document).ready(function () {
                 $('#btn1').click(myFunction);
                 $('#res1').dialog({
                     autoOpen: false, resizable: false, position: 'center',
                     stack: true, height: 'auto', width: 'auto', modal: true
                 });
             });
             function myFunction() {
                 var strSearch = $('#txt1').val();
                 var url = '@Url.Action("GetPassage", "Home")';
                 $.get(url, { 'strSearch': strSearch }, function (data) {
                     $('#res1').load(data).dialog('open');
                     alert(data);
                 })
             }
     </script>















The data does exist because I can use alert(data) to certify it. The data likes
  1. <div class="esv"><h2>John 3:16 <object type="application/x-shockwave-flash"  data="http://www.esvapi.org/assets/play.swf?myUrl=hw%2F43003016" width="40" height="12" class="audio"><param name="movie" value="http://www.esvapi.org/assets/play.swf?myUrl=hw%2F43003016" /><param name="wmode" value="transparent" /></object></h2>
    <div class="esv-text"><h3 id="p43003016.01-1">For God So Loved the World</h3>
    <p id="p43003016.07-1"><span class="verse-num woc" id="v43003016-1">16&nbsp;</span><span class="woc">&#8220;For God so loved the world,<span class="footnote">&nbsp;<a href="#f1" id="b1" title="Or 'For this is how God loved the world'">[1]</a></span> that he gave his only Son, that whoever believes in him should not perish but have eternal life.</span>  (<a href="http://www.esv.org" class="copyright">ESV</a>)</p>
    </div>
    <div class="footnotes">
    <h3>Footnotes</h3>
    <p><span class="footnote"><a href="#b1" id="f1">[1]</a></span> <span class="footnote-ref">3:16</span> Or <em>For this is how God loved the world</em>
    </p>
    </div>
    </div>








I think that
  1. $('#res1').load(data).dialog('open');
is wrong, so I change it as
  1. $('#res1').html(data).dialog('open');
Then it display the context but still no dialog.
BTW, this is the follow up thread of http://forum.jquery.com/topic/dialog-is-not-showing#14737000004286014
Thanks.