开发者

Weird issue with JQModal ,JQuery UI Tabs & ASP.NET checkbox list

I have a modal with JQuery UI tabs inside. There is a ASP.NET checkbox list server control in 开发者_如何转开发one of the tabs. I am facing a weird issue that if I set toTop:true in JQModal parameters

    $(document).ready(function() {
  $('#testDiv').jqm({toTop: true});

});

when I run a server side foreach on the checkbox list it always returns false on all items. Even though if they are selected/checked by user on screen ._.

foreach (ListItem li in cbItems.Items)
    {
        if (li.Selected) // <= Always false ???
        {
            DataRow dr = dt.NewRow();
            dr["ID"] = Convert.ToInt32(li.Value.ToString());
            dr["ITEMNAME"] = li.Text.ToString();
            dt.Rows.Add(dr);
        }
    }

Removing toTop from the JQModal parameters solves the problem but creates another problem that in IE7 my JQ modal window is behind the overlay of modal, which might be due to the container div having CSS position:relative. Any clue guys ?

Weird issue with JQModal ,JQuery UI Tabs & ASP.NET checkbox list


My guess is that when you set the toTop option JQModal is taking your div that contains the checkbox list and attaching it to the BODY tag instead of its normal position in the DOM. Since it is no longer inside the FORM tag, then when you do the postback those values are lost.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜