title: SCRIPT87: Invalid argument in IE 9, ASP.NET C#
body: <p>This is working in all other browsers except IE. I am building a link in the code behind in c#:</p>
  
  <pre><code>string link = &lt;a onclick=\"Myfunction('" + Server.UrlEncode(mystring) + "');\" href=\"javascript:void(0);\"&gt;Open Pop Up Window&lt;/a&gt;
  </code></pre>
  
  <p>This is my javascript function:</p>
  
  <pre><code> function Myfunction(pMyString) {
          CloseWindow();
  
          var url = "DomainPath/MyPage.aspx?Site=" + pMyString;
          win = window.open(url, "Manage Domain", 'toolbar=no,location=no,status=no,directories=no,scrollbars=yes,resizable=no,width='+700+',height='+500);
      }
  </code></pre>
  
  <p>If the function is added to an onclick method in the aspx page, it works in IE. It seems to be only when I am building the link dynamically in the code behind. It will not accept any values as a parameter, and IE always outputs the error: SCRIPT87: Invalid argument with a line number to my function, however I am unable to debug. Have a missed something?</p>
  
  <p>Here is the html output:</p>
  
  <pre><code>&lt;td&gt;&lt;a onclick="Myfunction('urlformyexample.com');" href="javascript:void(0);"&gt;Open Pop Up Window&lt;/a&gt;&lt;/td&gt;
  </code></pre>