开发者

How to remove the upper right close button

I need to kill the close 'x' button at the top of a jQuery UI modal dialog box. I have a modal that opens with an OK bu开发者_StackOverflowtton that redirects to the site. The site behind the modal is in an iframe. When the user agrees to the statement in the dialog box and clicks the 'OK' button, it redirects to the site that is outside the iframe. If the user clicks on the 'x', it goes to the iframe site, which I do not want to have happen.

I need the modal to work as a one-way to the site it goes to. It basically forces the user to accept the user agreement.

I would post code, but its an intranet site.

Thanks everyone for your help!

EDIT: This site is a government intranet portal, not a commercial site. So the goal is NOT to trap a user into the site, but rather to let the user know that the use of this site is restricted and to make sure you understand and accept the user agreement or you cannot use the site.


Why not style it to not display at all? Add this line to stylesheet:

.ui-dialog-titlebar-close { display: none }


You can add an event on open to remove the close button.

Using firebug I found that the CSS class for the <a> element is ui-dialog-titlebar-close.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜