开发者

jQuery Dialog with nested form

I have a jQuery dialog with a nested form inside of it. The form contains an input box and a submit button. When the dialog pops up I want the user to only be able to fill it out, and nothing else on the page. My css for that is done here:

.ui-widget-overlay 
{
    height: 1339px !important;
    width: 595px !important;
}

This works in allowing the user not to do anything else on the page, but the problem is that the input field is also disabled.

Any suggestions?

Edit: Here is how I make the dialog

function dialog(left, to开发者_StackOverflow社区p) {

    //Creates a new dialog
    $('#dialog').dialog({
        position: [left, top],
        height: 90,
        width: 200,
        resizable: false,
        modal: true,
        title: '<span class="ui-icon ui-icon-home"></span> Enter Info',
    });
}

Here is the form I use for the dialog:

<!-- Store Location Dialog -->
<div id = "dialog">
    <form id = "info" method = "post" action = "Default.aspx" \> 
        <input type = "text" id = "changeDialogText" name = "changeLocation" /> <!-- THIS IS DISABLED -->
        <input type = "button" id = "changeDialogSubmit" value = ""  onclick = "function()"/> 
    </form>
</div>


I figured out the issue. I had the z-index of my form lower then the z-index of the page. This caused issues with the dialog because it was unsure if the input was in the dialog or on page


The above does not provide a literal answer that is correct. z-Index auto does not cut it.

title: 'Quantity 1',
autoOpen: false,
show: 'slide',
hide: 'explode',
resizable: true,
stack: true,
height: "200",
width: "790",
zIndex: "auto",
modal: true
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜