Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / April 2005



Tip: Looking for answers? Try searching our database.

Short-Cut New Chromeless Window

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JeffP - 28 Apr 2005 19:07 GMT
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.....
Zifud - 28 Apr 2005 23:50 GMT
> I want to add a short-cut to a windows app similar to launching from a windows
> run line
[quoted text clipped - 4 lines]
> 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.

Signature

Zif

Wei Wang - 29 Apr 2005 02:13 GMT
> I want to add a short-cut to a windows app similar to launching from a windows
> run line
[quoted text clipped - 4 lines]
> 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,
Signature

Wei

J Wynia - 29 Apr 2005 15:00 GMT
>>I want to add a short-cut to a windows app similar to launching from a windows
>>run line
[quoted text clipped - 16 lines]
>
> 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 - 30 Apr 2005 08:58 GMT
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.....

> >>I want to add a short-cut to a windows app similar to launching from a windows
> >>run line
[quoted text clipped - 93 lines]
> </BODY>
> </HTML>
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.