<script type="text/javascript" language="javascript">
    function popUpWindow(sURL, sName, width, height, menu, resize, scrollbar, status, title, toolbar)
    {
            // Detect Default Value
            menu = typeof(menu) == 'undefined'?0:menu;
            resize = typeof(resize) == 'undefined'?0:resize;
            scrollbar = typeof(scrollbar) == 'undefined'?0:scrollbar;
            status = typeof(status) == 'undefined'?0:status;
            title = typeof(title) == 'undefined'?0:title;
            toolbar = typeof(toolbar) == 'undefined'?0:toolbar;
            ////////////////////////////////////////////////////////////////
           
            screenwidth = window.screen.width;
            screenheight = window.screen.height;
           
            var left = (screenwidth/2) - (width/2);
            var top = (screenheight/2) - (height/2);
           
            var newwin = window.open(sURL, sName, "top=" + top + ", left=" + left + ", height="+ height + ", width=" + width + ", menubar=" + menu + ", resizable=" + resize + ", scrollbars=" + scrollbar + ", status=" + status + ", titlebar=" + title + ", toolbar=" + toolbar + "");
            newwin.focus();
    }
    </script>

Comments

จำนวนความเห็น