Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - HTML webpage within IE loagin HTA with agruments

Reply
 
Old 05-12-2009   #1 (permalink)
malo.lexandre


 
 

HTML webpage within IE loagin HTA with agruments

Hello,

I have found you can actualy execute an HTA with some commandline
with the commandLine attribute.
I was wondering if it was possible to lauch an HTA with some arguments
from a web page within IE.

That would be the command to open the HTA
<A HREF="query\QueryViewer.hta">580</A>

This actualy work and open the HTA, but it would be really cool if I
could pass arguments

My System SpecsSystem Spec
Old 05-12-2009   #2 (permalink)
Tim Williams


 
 

Re: HTML webpage within IE loagin HTA with agruments

<A HREF="query\QueryViewer.hta?blah=580">580</A>

Just parse out the arguments from the href within the hta.

Tim

<malo.lexandre@xxxxxx> wrote in message
news:0b7acb90-9397-4d4c-82c8-4d25fc5112cb@xxxxxx
Quote:

> Hello,
>
> I have found you can actualy execute an HTA with some commandline
> with the commandLine attribute.
> I was wondering if it was possible to lauch an HTA with some arguments
> from a web page within IE.
>
> That would be the command to open the HTA
> <A HREF="query\QueryViewer.hta">580</A>
>
> This actualy work and open the HTA, but it would be really cool if I
> could pass arguments

My System SpecsSystem Spec
Old 05-13-2009   #3 (permalink)
Joe Fawcett


 
 

Re: HTML webpage within IE loagin HTA with agruments

As far as I can recall you can't do this. However you may be able to use the
Shell.Application.Windows method to get a reference back to the instance of
IE that launched it.

--

Joe Fawcett (MVP - XML)

http://joe.fawcett.name

"Tim Williams" <timjwilliams@xxxxxx> wrote in message
news:utE4Rl30JHA.6004@xxxxxx
Quote:

> <A HREF="query\QueryViewer.hta?blah=580">580</A>
>
> Just parse out the arguments from the href within the hta.
>
> Tim
>
> <malo.lexandre@xxxxxx> wrote in message
> news:0b7acb90-9397-4d4c-82c8-4d25fc5112cb@xxxxxx
Quote:

>> Hello,
>>
>> I have found you can actualy execute an HTA with some commandline
>> with the commandLine attribute.
>> I was wondering if it was possible to lauch an HTA with some arguments
>> from a web page within IE.
>>
>> That would be the command to open the HTA
>> <A HREF="query\QueryViewer.hta">580</A>
>>
>> This actualy work and open the HTA, but it would be really cool if I
>> could pass arguments
>
>

My System SpecsSystem Spec
Old 05-13-2009   #4 (permalink)
Tim Williams


 
 

Re: HTML webpage within IE loagin HTA with agruments

Here's an example: I'm using the HTA just as a host for a page within an
iframe, so I'm passing the
querystring parameter along to that page. The hosted page gets the HTA
privs.

Tim

'**************************************
<html>
<head>
<title>Edit Associations</title>

<hta:application icon="images/folder.ico"
id="Tracker"
applicationName="Tracker"
singleInstance="yes"
showInTaskbar="yes"
borderStyle="normal"
maximizebutton="no"
SYSMENU="yes"
selection="yes"
/>

<script type="text/javascript">
function Init()
{
var qs = window.location.search.substring(1) + "";

if(qs.length>0)
{
//pass the querystring through to the iframe page
document.getElementById("frmEdit").src = "edit.asp?" + qs;
window.resizeTo(800, 750);
}else{
alert("No Id was passed!");
window.close();
}

}
</script>

</head>

<body scroll="no" style="margin:0px" onload="Init();">
<iframe id="frmEdit" width="100%" height="100%"
frameborder="no" border="0"
marginheight="0" marginwidth="0"
application="yes"
src="blank.html">
</iframe>
</body>
</html>
'****************************************


"Joe Fawcett" <joefawcett@xxxxxx> wrote in message
news:eOd7oR80JHA.2656@xxxxxx
Quote:

> As far as I can recall you can't do this. However you may be able to use
> the Shell.Application.Windows method to get a reference back to the
> instance of IE that launched it.
>
> --
>
> Joe Fawcett (MVP - XML)
>
> http://joe.fawcett.name
>
> "Tim Williams" <timjwilliams@xxxxxx> wrote in message
> news:utE4Rl30JHA.6004@xxxxxx
Quote:

>> <A HREF="query\QueryViewer.hta?blah=580">580</A>
>>
>> Just parse out the arguments from the href within the hta.
>>
>> Tim
>>
>> <malo.lexandre@xxxxxx> wrote in message
>> news:0b7acb90-9397-4d4c-82c8-4d25fc5112cb@xxxxxx
Quote:

>>> Hello,
>>>
>>> I have found you can actualy execute an HTA with some commandline
>>> with the commandLine attribute.
>>> I was wondering if it was possible to lauch an HTA with some arguments
>>> from a web page within IE.
>>>
>>> That would be the command to open the HTA
>>> <A HREF="query\QueryViewer.hta">580</A>
>>>
>>> This actualy work and open the HTA, but it would be really cool if I
>>> could pass arguments
>>
>>
>
>

My System SpecsSystem Spec
Old 05-14-2009   #5 (permalink)
Joe Fawcett


 
 

Re: HTML webpage within IE loagin HTA with agruments

Yes, but that's hosting HTML page within an HTA. The poster asked about
launching an HTA from within an HTML page and passing querystring
parameters.

--

Joe Fawcett (MVP - XML)
http://joe.fawcett.name
"Tim Williams" <timjwilliams@xxxxxx> wrote in message
news:OddcZ7D1JHA.3988@xxxxxx
Quote:

> Here's an example: I'm using the HTA just as a host for a page within an
> iframe, so I'm passing the
> querystring parameter along to that page. The hosted page gets the HTA
> privs.
>
> Tim
>
> '**************************************
> <html>
> <head>
> <title>Edit Associations</title>
>
> <hta:application icon="images/folder.ico"
> id="Tracker"
> applicationName="Tracker"
> singleInstance="yes"
> showInTaskbar="yes"
> borderStyle="normal"
> maximizebutton="no"
> SYSMENU="yes"
> selection="yes"
> />
>
> <script type="text/javascript">
> function Init()
> {
> var qs = window.location.search.substring(1) + "";
>
> if(qs.length>0)
> {
> //pass the querystring through to the iframe page
> document.getElementById("frmEdit").src = "edit.asp?" + qs;
> window.resizeTo(800, 750);
> }else{
> alert("No Id was passed!");
> window.close();
> }
>
> }
> </script>
>
> </head>
>
> <body scroll="no" style="margin:0px" onload="Init();">
> <iframe id="frmEdit" width="100%" height="100%"
> frameborder="no" border="0"
> marginheight="0" marginwidth="0"
> application="yes"
> src="blank.html">
> </iframe>
> </body>
> </html>
> '****************************************
>
>
> "Joe Fawcett" <joefawcett@xxxxxx> wrote in message
> news:eOd7oR80JHA.2656@xxxxxx
Quote:

>> As far as I can recall you can't do this. However you may be able to use
>> the Shell.Application.Windows method to get a reference back to the
>> instance of IE that launched it.
>>
>> --
>>
>> Joe Fawcett (MVP - XML)
>>
>> http://joe.fawcett.name
>>
>> "Tim Williams" <timjwilliams@xxxxxx> wrote in message
>> news:utE4Rl30JHA.6004@xxxxxx
Quote:

>>> <A HREF="query\QueryViewer.hta?blah=580">580</A>
>>>
>>> Just parse out the arguments from the href within the hta.
>>>
>>> Tim
>>>
>>> <malo.lexandre@xxxxxx> wrote in message
>>> news:0b7acb90-9397-4d4c-82c8-4d25fc5112cb@xxxxxx
>>>> Hello,
>>>>
>>>> I have found you can actualy execute an HTA with some commandline
>>>> with the commandLine attribute.
>>>> I was wondering if it was possible to lauch an HTA with some arguments
>>>> from a web page within IE.
>>>>
>>>> That would be the command to open the HTA
>>>> <A HREF="query\QueryViewer.hta">580</A>
>>>>
>>>> This actualy work and open the HTA, but it would be really cool if I
>>>> could pass arguments
>>>
>>>
>>
>>
>
>


My System SpecsSystem Spec
Old 05-14-2009   #6 (permalink)
Tim Williams (Theravance)


 
 

Re: HTML webpage within IE loagin HTA with agruments

Joe,

I just posted an example I had on hand.
There's no requirement for the HTA to contain a hosted iframe - it's
just as easy to do this:

var qs = window.location.search.substring(1) + "";
alert("Passed parameter: " + qs); //or do something more
interesting with it...

After all, an HTA is really just mostly a regular HTML page: it just
runs in a different environment.

Tim





On May 14, 9:43*am, "Joe Fawcett" <joefawc...@xxxxxx> wrote:
Quote:

> Yes, but that's hosting HTML page within an HTA. The poster asked about
> launching an HTA from within an HTML page and passing querystring
> parameters.
>
> --
>
> Joe Fawcett (MVP - XML)http://joe.fawcett.name"Tim Williams" <timjwilli....@xxxxxx> wrote in message
>
> news:OddcZ7D1JHA.3988@xxxxxx
>
>
>
Quote:

> > Here's an example: I'm using the HTA just as a *host for a page within an
> > iframe, so I'm passing the
> > querystring parameter along to that page. *The hosted page gets the HTA
> > privs.
>
Quote:

> > Tim
>
Quote:

> > '**************************************
> > <html>
> > <head>
> > *<title>Edit Associations</title>
>
Quote:

> > *<hta:application *icon="images/folder.ico"
> > * * * id="Tracker"
> > * * * applicationName="Tracker"
> > * * * singleInstance="yes"
> > * * * showInTaskbar="yes"
> > * * * borderStyle="normal"
> > * * * maximizebutton="no"
> > * * * SYSMENU="yes"
> > * * * selection="yes"
> > * * * * */>
>
Quote:

> > *<script type="text/javascript">
> > * function Init()
> > * {
> > * *var qs = window.location.search.substring(1) + "";
>
Quote:

> > * *if(qs.length>0)
> > * *{
> > * * //pass the querystring through to the iframe page
> > * * document.getElementById("frmEdit").src = "edit.asp?" + qs;
> > * * window.resizeTo(800, 750);
> > * *}else{
> > * * alert("No Id was passed!");
> > * * window.close();
> > * *}
>
Quote:

> > * }
> > *</script>
>
Quote:

> > </head>
>
Quote:

> > <body scroll="no" style="margin:0px" onload="Init();">
> > *<iframe id="frmEdit" width="100%" height="100%"
> > * frameborder="no" border="0"
> > * marginheight="0" marginwidth="0"
> > * application="yes"
> > * src="blank.html">
> > *</iframe>
> > </body>
> > </html>
> > '****************************************
>
Quote:

> > "Joe Fawcett" <joefawc...@xxxxxx> wrote in message
> >news:eOd7oR80JHA.2656@xxxxxx
Quote:

> >> As far as I can recall you can't do this. However you may be able to use
> >> the Shell.Application.Windows method to get a reference back to the
> >> instance of IE that launched it.
>
Quote:
Quote:

> >> --
>
Quote:
Quote:

> >> Joe Fawcett (MVP - XML)
>
Quote:
>
Quote:
Quote:

> >> "Tim Williams" <timjwilli...@xxxxxx> wrote in message
> >>news:utE4Rl30JHA.6004@xxxxxx
> >>> <A HREF="query\QueryViewer.hta?blah=580">580</A>
>
Quote:
Quote:

> >>> Just parse out the arguments from the href within the hta.
>
Quote:
Quote:

> >>> Tim
>
Quote:
Quote:

> >>> <malo.lexan...@xxxxxx> wrote in message
> >>>news:0b7acb90-9397-4d4c-82c8-4d25fc5112cb@xxxxxx
> >>>> Hello,
>
Quote:
Quote:

> >>>> I have found you can actualy execute an HTA with some commandline
> >>>> with the commandLine attribute.
> >>>> I was wondering if it was possible to lauch an HTA with some arguments
> >>>> from a web page within IE.
>
Quote:
Quote:

> >>>> That would be the command to open the HTA
> >>>> <A HREF="query\QueryViewer.hta">580</A>
>
Quote:
Quote:

> >>>> This actualy work and open the HTA, but it would be really cool if I
> >>>> could pass arguments- Hide quoted text -
>
> - Show quoted text -
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
dns error on one particular webpage Network & Sharing
working on html objects using HTML DOM, VBscript VB Script
cant print from webpage Vista print fax & scan
Webpage as Backgournd Vista General
Webpage will not display Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46