I have a HTA that kicks off another HTA when the user clicks on a button. When the parent HTA is closed, I want to also close out any other HTA kicked off by the parent.
Is it possible to detect what HTA's are running? Or, to close out all child HTAs when the parent is closed?
Any assistance would be appreciated. Thanks.
Detecting if there is another HTA active
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Detecting if there is another HTA active
The following:
window.showModelessDialog("child.htm")
can just as easily be:
window.showModelessDialog(http://www.google.com)
or any other web location. Web locations will be sandboxed because of where they are loaded from. Any trusted locations will maintain trust. Untrusted will remain untrusted.
window.showModelessDialog("child.htm")
can just as easily be:
window.showModelessDialog(http://www.google.com)
or any other web location. Web locations will be sandboxed because of where they are loaded from. Any trusted locations will maintain trust. Untrusted will remain untrusted.
Detecting if there is another HTA active
Jvierra, I appreciate the response, the problem with launching the child window that way is that it will not let me focus on the parent window until I close the child. Is there a way around that?
Here is how I initially launched the child:
----------------------------------------------------------------------------------------
strCommand = "%systemroot%system32mshta.exe MyFile.hta" set objShell = CreateObject("Wscript.Shell") set objProc = objShell.Exec(strCommand)
---------------------------------------------------------------------------------------
Thanks!
Here is how I initially launched the child:
----------------------------------------------------------------------------------------
strCommand = "%systemroot%system32mshta.exe MyFile.hta" set objShell = CreateObject("Wscript.Shell") set objProc = objShell.Exec(strCommand)
---------------------------------------------------------------------------------------
Thanks!
Detecting if there is another HTA active
This:
window.showModelessDialog("child.htm")
Will let you focus on either window.
This is modal:
window.showModalDialog "http://www.google.com",,optionsx
Recognize the differences and all will be well.
Using teh shell command will give you no end of headaches.
jvierra2009-10-16 14:07:18
window.showModelessDialog("child.htm")
Will let you focus on either window.
This is modal:
window.showModalDialog "http://www.google.com",,optionsx
Recognize the differences and all will be well.
Using teh shell command will give you no end of headaches.
jvierra2009-10-16 14:07:18
Detecting if there is another HTA active
Hey, guys, I hate to jump back in with another question, but I am trying to reload the modal window after running a function. The last line inside of the function is a window.location.reload(true), but the window is not reloading. The function runs inside of the modal page. Is there something different that I need to do to reload a modal window?
------------------------- How I load the modal window ----------------------
window.showModalDialog "MyFile.html", "message", "dialogHeight:280px; dialogWidth: 620px; scroll: yes; status: off; resizable: off; center: yes;"
--------------------------------------------------------------------------------------
------------------------- How I load the modal window ----------------------
window.showModalDialog "MyFile.html", "message", "dialogHeight:280px; dialogWidth: 620px; scroll: yes; status: off; resizable: off; center: yes;"
--------------------------------------------------------------------------------------