Connecting Tech Pros Worldwide Forums | Help | Site Map

Short-Cut New Chromeless Window

JeffP
Guest
 
Posts: n/a
#1: Jul 23 '05
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
Guest
 
Posts: n/a
#2: Jul 23 '05

re: Short-Cut New Chromeless Window


JeffP wrote:[color=blue]
> 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.
>[/color]

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.
[color=blue]
> TIA[/color]

You're welcome.


--
Zif
Wei Wang
Guest
 
Posts: n/a
#3: Jul 23 '05

re: Short-Cut New Chromeless Window


JeffP wrote:[color=blue]
> 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.[/color]

I am just guessing here.

Something like the following?

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

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

Regards,
--
Wei
J Wynia
Guest
 
Posts: n/a
#4: Jul 23 '05

re: Short-Cut New Chromeless Window


Wei Wang wrote:[color=blue]
> JeffP wrote:
>[color=green]
>>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.[/color]
>
>
> I am just guessing here.
>
> Something like the following?
>
> window.open("product.xul", "Product",
> "chrome,dialog,modal,close=no,titlebar=no,resizabl e=no");
>
> That's something I have been trying out with Firefox and XUL. Have no
> idea about Windows or IE.
>
> Regards,[/color]

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
Guest
 
Posts: n/a
#5: Jul 23 '05

re: Short-Cut New Chromeless Window


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" <jwynia@speakeasy.net> wrote in message
news:CKqdnUZTqZ-No-_fRVn-sw@speakeasy.net...[color=blue]
> Wei Wang wrote:[color=green]
> > JeffP wrote:
> >[color=darkred]
> >>I want to add a short-cut to a windows app similar to launching from a[/color][/color][/color]
windows[color=blue][color=green][color=darkred]
> >>run line
> >>
> >>a New window, to prevent changing an existing browser window from moving off[/color][/color][/color]
a[color=blue][color=green][color=darkred]
> >>current logged in session to another web application.
> >>
> >>And, I'd like it to be a chromeless window, sans toobars and sized similar[/color][/color][/color]
to a[color=blue][color=green][color=darkred]
> >>popup.[/color]
> >
> >
> > I am just guessing here.
> >
> > Something like the following?
> >
> > window.open("product.xul", "Product",
> > "chrome,dialog,modal,close=no,titlebar=no,resizabl e=no");
> >
> > That's something I have been trying out with Firefox and XUL. Have no
> > idea about Windows or IE.
> >
> > Regards,[/color]
>
> 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>[/color]


Closed Thread