RSS LOGORss   Welcome Guest  Login Register
Welcome to our Blogs
Back Back
Subject


mag
2008/06/14 07:16PM
Modal Windows      Number of views: 1780

Hi, I have faced a lot of problems regarding the Modal windows issues, it's a very useful tips.

To Create Modal Window

function openProcedures(url) {
            if (window.showModalDialog) {
            window.showModalDialog( url ,"name", "dialogWidth:850px;dialogHeight:720px");
            } else {
            window.open( url ,'name', 'height=720,width=820,toolbar=no,directories=no,status=no, menubar=no,scrollbars=no,resizable=no ,modal=yes');
        }
    }

After you created the modal window, you may face some troubles in posting back to the same window, and here is the resolution from (http://www.velocityreviews.com/forums/t82012-modal-forms-and-postback.html)

Rename the current window with 'modal' or any other name, the trick is to state in the <FORM> target attribute's value to the name of the window.
<script>
window.name="modal"
</script>
<form id="myForm" method="post" target="modal" runat="server">
</form>

Or just put everything you want in an IFRAME, and it will work :) or in the write

<BASE target="_self">