开发者

JqueryUI Dialog MVC3 HTML Form

I am having problems getting a partial view that is filled with an html form to appear within a Jqueryui dialog. I cannot duplicate the example at the Jqueryui site. Can someone show me the simplest way to render html forms, within the JqueryUI dialog widget? Thanks

I am getting

THE ERROR

ET /Scripts/jquery-1.5.1.js HTTP/1.1 Accept: / Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB6.6; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E) Host: localhost:50754 Connection: Keep-Alive Cookie: .ASPXANONYMOUS=3CEJFuUvzAEkAAAAZWRlYmMyYTEtNjI2YS00ZTJiLTlmNjQtMGU5ODQ2NTkyOTFk54B7开发者_运维问答ON5wgoeekvTVLpo7z2v7OtwKj872YahaQ6h9Q8w1

HTTP/1.1 404 Not Found Server: ASP.NET Development Server/10.0.0.0 Date: Thu, 21 Apr 2011 19:18:34 GMT X-AspNet-Version: 4.0.30319 Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 3211 Connection: Close

THE FORM

<div id="dialog-form" title="Create new user"><form id="form1">
<fieldset>
    <label for="name">Name</label>
    <input type="text" name="name" id="name" class="text ui-widget-content ui-corner-all" />
    <label for="email">Email</label>
    <input type="text" name="email" id="email" value="" class="text ui-widget-content ui-corner-all" />
    <label for="password">Password</label>
    <input type="password" name="password" id="password" value="" class="text ui-widget-content ui-corner-all" />
</fieldset>
<button id="opener">Create new user</button></form></div>

THE SCRIPT

  <script type="text/javascript">  $(function ()  {
        $( "#dialog-form" ).dialog({
        autoOpen: false,
        height: 300,
        width: 350,
        modal: true,
        buttons: 
        {           
            Cancel: function() 
            {
 $( this ).dialog( "close" );
            }
        }
        $("#opener").click(function() { 
           $("#dialog-form").dialog("open"); 
           }
      });                        
   </script>


according to the error above you are missing "/Scripts/jquery-1.5.1.js " on your server and hence getting a 404. Interestingly enough (assuming a copy /paste error) it says "ET /Scripts/jquery-1.5.1.js " not "GET" but Im assuming its a copy paste.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜