Unable to open a text file in notepad via Javascript function
<p>I'm unable to open a text file in notepad via the Javascript function below. If you'd like to help please run this self explanatory script. Thanks.</p>

<pre><code>  &lt;script type="text/javascript"&gt;

  function RunURL(URL,Name) {
  window.open (URL,Name,
  "Width=1010,\
  Height=800,\
  Top=0,\
  Left=0,\
  Channelmode=0,\
  Titlebar=0,\
  Menubar=0,\
  Toolbar=0,\
  Directories=0,\
  Location=0,\
  Status=0,\
  Scrollbars=1,\
  Resizable=1,\
  Fullscreen=0");
  }

  &lt;/script&gt;
</code></pre>

<p>Unfortunately I can't post the code in one piece...</p>

<pre><code>  &lt;html&gt;&lt;form&gt;

  &lt;h2&gt;Trying to open a text file in notepad for an Intranet app...&lt;/h2&gt;&lt;br&gt;

  First the easy one...&lt;br&gt;

  &lt;input Type="button"; Value="Open Notepad"; OnClick="RunURL('file:///C:/Windows/system32/notepad.exe')";&gt;&lt;br&gt;

  &lt;br&gt;Now to open a text file so let's start with some common sense for the parameters as displayed in the buttons...&lt;br&gt;

  &lt;input Type="button"; Value="?=C:\Test.txt"; OnClick="RunURL('file:///C:/Windows/system32/notepad.exe?=C:\Test.txt')";&gt;&lt;br&gt;
  &lt;input Type="button"; Value="?=file:///C:/Test.txt"; OnClick="RunURL('file:///C:/Windows/system32/notepad.exe?=file:///C:/Test.txt')";&gt;&lt;br&gt;
  &lt;input Type="button"; Value="?C:\Test.txt"; OnClick="RunURL('file:///C:/Windows/system32/notepad.exe?C:\Test.txt')";&gt;&lt;br&gt;

  &lt;br&gt;Desperation takes over!&lt;br&gt;

  &lt;input Type="button"; Value="?open=file:///C:/Test.txt"; OnClick="RunURL('file:///C:/Windows/system32/notepad.exe?open=file:///C:/Test.txt')";&gt;&lt;br&gt;
  &lt;input Type="button"; Value="?open=C:\Test.txt"; OnClick="RunURL('file:///C:/Windows/system32/notepad.exe?open=C:\Test.txt')";&gt;&lt;br&gt;
  &lt;input Type="button"; Value="?open=C:/Test.txt"; OnClick="RunURL('file:///C:/Windows/system32/notepad.exe?open=C:/Test.txt')";&gt;&lt;br&gt;
  &lt;input Type="button"; Value="?C:/Test.txt"; OnClick="RunURL('file:///C:/Windows/system32/notepad.exe?C:/Test.txt')";&gt;&lt;br&gt;

  &lt;br&gt;Could the file association alone trigger notepad to open it?&lt;br&gt;

  &lt;input Type="button"; Value="file:///C:/Test.txt"; OnClick="RunURL('file:///C:/Test.txt')";&gt;&lt;br&gt;
  &lt;input Type="button"; Value="C:/Test.txt"; OnClick="RunURL('C:/Test.txt')";&gt;&lt;br&gt;

  &lt;br&gt;Nope!&lt;br&gt;
  &lt;/form&gt;&lt;/html&gt;
</code></pre>

<p>Maybe I should go back to flipping burgers... :(</p>
