asp.net mvc - MVC Jquery Dialog: modal:true prevents the dialog from rendering -
i using mvc2 on vs2010 express edition.
i have (simplified) page includes renderpartial dialog. dialog supposed pop when button clicked. however, if include modal:true 1 of dialog options, when button clicked nothing happens. dialog not pop up. when remove modal:true dialog options dialog pops expected , closed expected. please help. have sent time researching problem , can't find anything. when @ first had list several options specified dialog , not poping up, removed them 1 one find out if of them causing problem, , sure enough when removed modal dialog rendered on clicking button. adding option modal: true stopped rendering of dialog again.
these in master page:
<link href="<%=resolveurl("~")%>app_themes/smoothness/jquery-ui-1.8.2.custom.css" rel="stylesheet" type="text/css" /> <%=html.script("~/scripts/jquery-1.4.2.min.js")%> <%=html.script("~/scripts/jquery-ui-1.8.2.custom.min.js")%> <%=html.script("~/scripts/jquery.form.js")%>
this page rendered. first line in bold line button when clicked, open dialog. second line in bold line supposed render dialog:
- request dialog
my menu
<% html.renderpartial("get_dlg", viewdata.model.fname); %>this entire code dialog page (get_dlg). such, dialog not show when button clicked. removing line in bold reason allow dialog rendered!
<script type="text/javascript"> $(document).ready(function () { $("#get_dlg").dialog({ title: 'get dialog', autoopen: false, modal: true }); $('#requestdialog').click(function () { $('#get_dlg').dialog("open"); }) }); </script>
show me something! any suggestions please?
i got on asp.net forum: css problem. adding following ascx (view) fixed problem:
<style type="text/css"> .ui-widget-overlay { background-color: #000000; left: 0; opacity: 0.5; position: absolute; top: 0; } .ui-dialog { background-color: #ffffff; border: 1px solid #505050; position: absolute; overflow: hidden; } </style>
Comments
Post a Comment