Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

Tuesday, October 14, 2014

javascript full screen fullscreen window for internet explorer script

  <meta http-equiv="X-UA-Compatible" content="IE=8" />
<body dir="rtl" onload="FullScreenWindow();">



function FullScreenWindow() {
    //window.moveTo(0,0);
    //resizeTo(screen.availWidth,screen.availHeight);

    window.moveTo(0, 0);
    if (document.layers) // navigator 4+
    {
        var deltaX = screen.availWidth - window.outerWidth;
        var deltaY = screen.availHeight - window.outerHeight;
        window.resizeBy(deltaX, deltaY);
    } else if (document.all) // exploder 4+
    { resizeTo(screen.availWidth, screen.availHeight); }

}



Sunday, February 9, 2014

open popup full screen ie firefox chrome

function openFullscreen(page) {
    var yes = 1;
    var no = 0;
    var menubar = no; // The File, Edit, View Menus
    var scrollbars = no; // Horizontal and vertical scrollbars
    var locationbar = no; // The location box with the site URL
    var directories = no; // the "What's New", "What Cool" links
    var resizable = no; // Can the window be resized?
    var statusbar = no; // Status bar (with "Document: Done")
    var toolbar = no; // Back, Forward, Home, Stop toolbar
    if (navigator.appName == "Microsoft Internet Explorer") { // better be ie6 at least
        windowprops = "width=" + (screen.width - 10) + ",height=" + (screen.height - 30) + ",top=0,left=0";
    }
    else { // i.e. if Firefox
        windowprops = "width=" + (screen.width - 5) + ",height=" + (screen.height - 30) + ",top=0,left=0";
    }
    windowprops += (menubar ? ",menubars" : "") +
            (scrollbars ? ",scrollbars" : "") +
            (locationbar ? ",location" : "") +
            (directories ? ",directories" : "") +
            (resizable ? ",resizable" : "") +
            (statusbar ? ",status" : "") +
            (toolbar ? ",toolbar" : "");
    window.open(page, 'fullPopup', windowprops);
    window.opener = top; // this will close opener in ie only (not Firefox)
    // window.opener.print();
    window.close();
}

///////////////////////////////////////////////////
ajax call example

  ScriptManager.RegisterStartupScript(this, typeof(string), "DisplayFile", "openFullscreen('" + Request.QueryString["url"].ToString() + "');", true);

jquery javascript multi line alert

exmaple for multiline alert

//check if radio button checked and return alert
  if ($("#imgTypejpeg2").prop('checked')) {
                alert("jpg checked ");
                if ($("#BW").prop('checked')) {
                    alert(" لا يمكن أرشفة نوع الورق أبيض وأسود " +
                    "مع نوع الوثيقة " +
                          '\n' +
                          "JPEG");
                    return false;
                }
                if ($("#Gray").prop('checked')) {

                    alert(" لا يمكن أرشفة نوع الورق الرمادي " +
                    "مع نوع الوثيقة " +
                          '\n' +
                          "JPEG");
                    return false;
                }
            }


Tuesday, April 24, 2012

flexigrid-1.1 fix Html table Using Jquery

flexigrid-1.1 is very nice javascript and css Library to fix Html table sorting drag and drop view and hide table column

Link for Download files.

http://code.google.com/p/flexigrid/downloads/list