Windows Vista Forums

HTML webpage within IE loagin HTA with agruments

  1. #1


    malo.lexandre Guest

    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

  2. #2


    Tim Williams Guest

    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

    > 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

  3. #3


    Joe Fawcett Guest

    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

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

  4. #4


    Tim Williams Guest

    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

    > 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

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

  5. #5


    Joe Fawcett Guest

    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

    > 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

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

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

  6. #6


    Tim Williams (Theravance) Guest

    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:

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

    > > 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" <joefawc...@xxxxxx> wrote in message
    > >news:eOd7oR80JHA.2656@xxxxxx

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

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

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

    > >>> Tim
    >

    > >>> <malo.lexan...@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- Hide quoted text -
    >
    > - Show quoted text -

      My System SpecsSystem Spec

HTML webpage within IE loagin HTA with agruments

Similar Threads
Thread Thread Starter Forum Replies Last Post
Solved Webpage Design howwon Network & Sharing 2 20 Sep 2008
working on html objects using HTML DOM, VBscript Rama VB Script 3 18 Aug 2008
Can't save a webpage Joseph Vista General 0 12 Oct 2007
Webpage not opening in IE7 HanLee Vista General 6 01 Oct 2007
webpage on desktop ryuujin Vista General 0 04 Dec 2006