opening a new window from a HTA

Giganews Newsgroups
Subject: opening a new window from a HTA
Posted by:  Andrew Poulos (ap_pr…@hotmail.com)
Date: Thu, 15 Nov 2007

There's a HTA application that's running on a local computer (not from a
URL) and the user can open a new HTML window by clicking a button

The first time the user clicks the button the window opens. Any
subsequent click causes this dialog, with this error, to appear:

"Error: The remote server machine does not exist or is unavailable"

The relevant code is

oline.onclick = function() {
  if (outline.win && outline.win.open && !outline.win.closed) {
    outline.win.focus();
  } else {
    outline.win = window.open(outline.fileName,"", "");
  }
};

The MS script debugger claims the error is on the line that starts
"if (outline.win..."

Why does the error occur and how do I resolve it?

Andrew Poulos

Replies