Web Analytics Made Easy -
StatCounter how to pass parameters to HTA? - CodingForum

Announcement

Collapse
No announcement yet.

how to pass parameters to HTA?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to pass parameters to HTA?

    in order to save something to my local hard disk, I opened a .HTA window, then in that window I want to get some variables from
    its opener(.html), I tried opener. XXXX, it doesn't work, I
    guess it's due to HTA's difference from html. but anybody knows how to solve that problem? I need your help, thank you!

  • #2
    Communicate through cookie. Before opening the HTA page, save a cookie then in the HTA, retrieve the cookie. There are many cookie scripts in the net and you can see one in the Javascript FAQ sticky thread in this forum.
    Glenn
    vBulletin Mods That Rock!

    Comment


    • #3
      thank you,but the problem is the parameters I want to pass to
      HTA is a MS DOM object which is big and complicated...
      I tried to open a modeless dialog instead, this time I can use
      window.dialogArguments to get that DOM object, but it seems
      the dialog doesn't support HTA...

      Comment


      • #4
        How are you opening the HTA?

        What are you trying to save?

        From what security zone are you trying to save it?

        In what format will it be saved?

        Does your HTA have a GUI, or is it just being used to interface with the WSH?

        Provide as much detail as necessary to allow someone reading your question to understand the task.
        hmm... ?

        Comment


        • #5
          sorry, I didn't describe my problem clearly enough, fortrunately
          someone has helped me solve it, and I post his code here,hope it helps
          <html>
          <head>
          <script>
          var xyz = "Some Value";
          window.name = "parentPage";
          </script>
          </head>
          <body>
          <form>
          <input type=button value="HTA" onClick='window.open("abc.hta")'>
          </form>
          </body>
          </html>


          and here the abc.hta page:
          <html>
          <body>
          <script>
          var parentPage = window.open("","parentPage","top=6000,left=6000");
          document.write(parentPage.xyz);
          </script>
          </body>
          </html>

          Comment

          Working...
          X