Short-Cut New Chromeless Window

Discussion in 'Javascript' started by JeffP, Apr 28, 2005.

  1. JeffP

    JeffP Guest

    I want to add a short-cut to a windows app similar to launching from a windows
    run line

    a New window, to prevent changing an existing browser window from moving off a
    current logged in session to another web application.

    And, I'd like it to be a chromeless window, sans toobars and sized similar to a
    popup.

    TIA

    JeffP.....
    JeffP, Apr 28, 2005
    #1
    1. Advertising

  2. JeffP

    Zifud Guest

    JeffP wrote:
    > I want to add a short-cut to a windows app similar to launching from a windows
    > run line
    >
    > a New window, to prevent changing an existing browser window from moving off a
    > current logged in session to another web application.
    >
    > And, I'd like it to be a chromeless window, sans toobars and sized similar to a
    > popup.
    >


    Perhaps you should ask in a Windows developer forum? One that can
    guess what your unnamed "windows app" is that is launched from a
    "run line" and has some idea what "sized similar to a popup" means.

    > TIA


    You're welcome.


    --
    Zif
    Zifud, Apr 28, 2005
    #2
    1. Advertising

  3. JeffP

    Wei Wang Guest

    JeffP wrote:
    > I want to add a short-cut to a windows app similar to launching from a windows
    > run line
    >
    > a New window, to prevent changing an existing browser window from moving off a
    > current logged in session to another web application.
    >
    > And, I'd like it to be a chromeless window, sans toobars and sized similar to a
    > popup.


    I am just guessing here.

    Something like the following?

    window.open("product.xul", "Product",
    "chrome,dialog,modal,close=no,titlebar=no,resizable=no");

    That's something I have been trying out with Firefox and XUL. Have no
    idea about Windows or IE.

    Regards,
    --
    Wei
    Wei Wang, Apr 29, 2005
    #3
  4. JeffP

    J Wynia Guest

    Wei Wang wrote:
    > JeffP wrote:
    >
    >>I want to add a short-cut to a windows app similar to launching from a windows
    >>run line
    >>
    >>a New window, to prevent changing an existing browser window from moving off a
    >>current logged in session to another web application.
    >>
    >>And, I'd like it to be a chromeless window, sans toobars and sized similar to a
    >>popup.

    >
    >
    > I am just guessing here.
    >
    > Something like the following?
    >
    > window.open("product.xul", "Product",
    > "chrome,dialog,modal,close=no,titlebar=no,resizable=no");
    >
    > That's something I have been trying out with Firefox and XUL. Have no
    > idea about Windows or IE.
    >
    > Regards,


    On IE, if you rename any .html file to .hta, it becomes an "HTML
    Application" and launches outside the browser as its own app. There are
    additional parameters (and I'll post a sample structure below) that
    control the window's appearance and restrictions on things like right
    clicking.

    The biggest thing to be aware of (for you and any users of your app) is
    that an HTA is outside the security sandbox (such as it is) for IE. That
    means that while a regular HTML file using Javascript can't access local
    files, the registry, etc. an HTA file *can* do all of those things. It
    has pretty much unfettered access to the local machine. The example
    below contains a function that launches Notepad to edit the HTA itself.

    To use an HTA as a basic site container, you're usually best off to make
    a full-size <iframe> that has it's src attribute pointed to your
    starting URL. This prevents clicked links from opening new IE windows
    and keeps everything inside your HTA.

    Also be sure to either leave either the sysmenu set to true (giving you
    the "x" in the top right or provide a button/link to window.close().
    Otherwise, it takes an ALT-F4 to kill the window. To make the example
    chromeless, change the CAPTION to "no" instead of "yes".

    All of the attributes of the HTA:Application tag are documented at
    microsoft.com

    -------------------------------------
    J Wynia
    Myriad Intellect, Inc.
    "Web technology that earns its keep."
    www.myriadintellect.com
    -------------------------------------

    ----------yourfile.hta-------------
    <HTML>
    <HEAD>
    <TITLE>Your HTA Application</TITLE>
    <HTA:APPLICATION ID="yourHTA"
    APPLICATIONNAME="Your HTA Application"
    BORDER="thin"
    CAPTION="yes"
    CONTEXTMENU="yes"
    ICON=""
    INNERBORDER="no"
    MAXIMIZEBUTTON="yes"
    MINIMIZEBUTTON="yes"
    NAVIGABLE="yes"
    SCROLL="auto"
    SELECTION="yes"
    SHOWINTASKBAR="yes"
    SINGLEINSTANCE="no"
    SYSMENU="yes"
    VERSION="1.0"
    WINDOWSTATE="normal"/>
    <script language="javascript">
    <!--
    function edit_hta(){
    $this_hta = yourHTA.commandLine;
    $command = "notepad.exe " + $this_hta;
    $objShell = new ActiveXObject("WScript.Shell");
    $lngReturn = $objShell.Run ($command, 1, true);
    }
    // -->
    </script>
    </HEAD>
    <BODY>
    Your HTA content goes here. Simply <a href="#"
    onclick="edit_hta();">open this HTA file</a> in a text editor and go to
    town. If you're looking to make this window look much more like a
    regular Windows application, I recommend looking at the <a
    href="http://webfx.eae.net/docs/environ.html">CSS values that you can
    grab from the current Windows theme</a>. By setting your CSS to use
    those values instead of things like #CCCCCC, you can make the HTA app
    blend in with the current Windows settings.
    </BODY>
    </HTML>
    J Wynia, Apr 29, 2005
    #4
  5. JeffP

    JeffP Guest

    J Wynia thanks....

    I found that if I use the following I get a new window, and I'll review your
    code below..

    From a the Windows run line....
    run: iexplore.exe http://myserver/mywebapp/mailrem.aspx

    I may also try to put a literal in my aspx page that can do the following.

    -- re-direct to a new instance browser chromeless window and the required page
    -- go back one to restore the original browser window to the previous web
    application

    I'm not sure what's so confusing my users run a windows application for their
    CRM processes, which I can cmd buttons to launch other programs or an internet
    browser.

    These users are also usually logged into one of a few websites for our business
    service partners and they don't like being logged out. They'd prefer a new
    browser window.

    I have many times launched chromeless windows from w/in my own web app for
    clients that run one single web app, but this client has no less than 4 to 6
    windows open to their service providers.

    I'll post my best solution state when available....

    Thanks again...

    JeffP.....


    "J Wynia" <> wrote in message
    news:...
    > Wei Wang wrote:
    > > JeffP wrote:
    > >
    > >>I want to add a short-cut to a windows app similar to launching from a

    windows
    > >>run line
    > >>
    > >>a New window, to prevent changing an existing browser window from moving off

    a
    > >>current logged in session to another web application.
    > >>
    > >>And, I'd like it to be a chromeless window, sans toobars and sized similar

    to a
    > >>popup.

    > >
    > >
    > > I am just guessing here.
    > >
    > > Something like the following?
    > >
    > > window.open("product.xul", "Product",
    > > "chrome,dialog,modal,close=no,titlebar=no,resizable=no");
    > >
    > > That's something I have been trying out with Firefox and XUL. Have no
    > > idea about Windows or IE.
    > >
    > > Regards,

    >
    > On IE, if you rename any .html file to .hta, it becomes an "HTML
    > Application" and launches outside the browser as its own app. There are
    > additional parameters (and I'll post a sample structure below) that
    > control the window's appearance and restrictions on things like right
    > clicking.
    >
    > The biggest thing to be aware of (for you and any users of your app) is
    > that an HTA is outside the security sandbox (such as it is) for IE. That
    > means that while a regular HTML file using Javascript can't access local
    > files, the registry, etc. an HTA file *can* do all of those things. It
    > has pretty much unfettered access to the local machine. The example
    > below contains a function that launches Notepad to edit the HTA itself.
    >
    > To use an HTA as a basic site container, you're usually best off to make
    > a full-size <iframe> that has it's src attribute pointed to your
    > starting URL. This prevents clicked links from opening new IE windows
    > and keeps everything inside your HTA.
    >
    > Also be sure to either leave either the sysmenu set to true (giving you
    > the "x" in the top right or provide a button/link to window.close().
    > Otherwise, it takes an ALT-F4 to kill the window. To make the example
    > chromeless, change the CAPTION to "no" instead of "yes".
    >
    > All of the attributes of the HTA:Application tag are documented at
    > microsoft.com
    >
    > -------------------------------------
    > J Wynia
    > Myriad Intellect, Inc.
    > "Web technology that earns its keep."
    > www.myriadintellect.com
    > -------------------------------------
    >
    > ----------yourfile.hta-------------
    > <HTML>
    > <HEAD>
    > <TITLE>Your HTA Application</TITLE>
    > <HTA:APPLICATION ID="yourHTA"
    > APPLICATIONNAME="Your HTA Application"
    > BORDER="thin"
    > CAPTION="yes"
    > CONTEXTMENU="yes"
    > ICON=""
    > INNERBORDER="no"
    > MAXIMIZEBUTTON="yes"
    > MINIMIZEBUTTON="yes"
    > NAVIGABLE="yes"
    > SCROLL="auto"
    > SELECTION="yes"
    > SHOWINTASKBAR="yes"
    > SINGLEINSTANCE="no"
    > SYSMENU="yes"
    > VERSION="1.0"
    > WINDOWSTATE="normal"/>
    > <script language="javascript">
    > <!--
    > function edit_hta(){
    > $this_hta = yourHTA.commandLine;
    > $command = "notepad.exe " + $this_hta;
    > $objShell = new ActiveXObject("WScript.Shell");
    > $lngReturn = $objShell.Run ($command, 1, true);
    > }
    > // -->
    > </script>
    > </HEAD>
    > <BODY>
    > Your HTA content goes here. Simply <a href="#"
    > onclick="edit_hta();">open this HTA file</a> in a text editor and go to
    > town. If you're looking to make this window look much more like a
    > regular Windows application, I recommend looking at the <a
    > href="http://webfx.eae.net/docs/environ.html">CSS values that you can
    > grab from the current Windows theme</a>. By setting your CSS to use
    > those values instead of things like #CCCCCC, you can make the HTA app
    > blend in with the current Windows settings.
    > </BODY>
    > </HTML>
    JeffP, Apr 30, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U3VyZXNo?=
    Replies:
    0
    Views:
    521
    =?Utf-8?B?U3VyZXNo?=
    Mar 2, 2004
  2. Brian K. Williams
    Replies:
    0
    Views:
    543
    Brian K. Williams
    Mar 2, 2004
  3. JDP@Work

    Short-cut to New chromeless aspx page ?

    JDP@Work, Apr 28, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    106
    JDP@Work
    Apr 28, 2005
  4. George Hester
    Replies:
    1
    Views:
    118
    Richard Cornford
    Dec 10, 2003
  5. Jeff Johnson

    Chromeless Window With Rounded Borders

    Jeff Johnson, Jan 5, 2004, in forum: Javascript
    Replies:
    3
    Views:
    123
    cwdjr
    Jan 7, 2004
Loading...

Share This Page