Short-Cut New Chromeless Window

J

JeffP

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.....
 
Z

Zifud

JeffP said:
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.

You're welcome.
 
W

Wei Wang

JeffP said:
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,
 
J

J Wynia

Wei said:
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

JeffP

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.....
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top