title: vb .net, javascript issue involving strict mode
body: <p>I have a VB .net application that I am attempting to integrate with a former deverlopers code.
  The code takes a zipcode and returns a list of stores, along with their location on a google map canvas. </p>
  
  <p>The process works great, with one exception. </p>
  
  <p>I get the following error </p>
  
  <blockquote>
    <p>JavaScript runtime error:  Accessing the 'caller' property of a
    function or arguments object is not allowed in strict mode.</p>
  </blockquote>
  
  <p>I have isolated the culprit to </p>
  
  <pre><code>__doPostBack('userControlSearchResults_results', LatLng);
  </code></pre>
  
  <p>Which internally has the following</p>
  
  <pre><code>function Sys$WebForms$PageRequestManager$_doPostBack(eventTarget, eventArgument) {
          var event = window.event;
          if (!event) {
              var caller = arguments.callee ? arguments.callee.caller : null;
              if (caller) {
                  var recursionLimit = 30;
                  while (caller.arguments.callee.caller &amp;&amp; --recursionLimit) {
                      caller = caller.arguments.callee.caller; // ERRORS HERE
                  }
                  event = (recursionLimit &amp;&amp; caller.arguments.length) ? caller.arguments[0] : null;
              }
          }
      ...
  </code></pre>
  
  <p>My first inclination was to create a window.event so it by passes the if(!event) and moves on. 
  Since, there are other times we call __doPostback in the code and it is successful. </p>
  
  <p>However since my JavaScript is limited, i am either doing it wrong or need to find a different approach.</p>
  
  <p>I have searched for this problem and very little has come back.  The common response is to just comment out the 'use strict'; and move on.</p>
  
  <p>The problem is we pull in a lot of JavaScript libraries and many of them are now set to 'use strict'</p>
  
  <p>Does anyone have a suggestion or an idea on how to address this?</p>
  
  <p>A blog made reference to trying to apply a setTimeout() before the __doPostback call. 
  However I do not see how that would resolve anything.</p>
  
  <p>Edit: Added some more code. </p>
  
  <p>__doPostback is within the following javascript</p>
  
  <pre><code>function CompleteSearch(returnedLatLng) {
  
      if (returnedLatLng != '') {
          alert("dopostback here2- this is where it breaks");
          __doPostBack('ucSearchResults_udpResults', returnedLatLng);
          if (document.getElementById("sidebar_search")) { document.getElementById("sidebar_search").style.display = "none" };
          if (document.getElementById("sidebar_login")) { document.getElementById("sidebar_login").style.display = "none" };
          if (document.getElementById("promo1")) { document.getElementById("promo1").style.display = "none" };
          document.getElementById("sidebar_results").style.display = "block";
          //document.getElementById("sidebar_results").style.display = "none";
      }
      return false;
  }
  </code></pre>
  
  <p>Where as my update panel is within a user control and looks like this...</p>
  
  <pre><code>&lt;form id="Form1" runat="server"&gt;
  &lt;asp:ScriptManager ID="ScriptManager1" runat="server" /&gt;
  &lt;div id="Container" style="zoom:1" onclick=""&gt;
      &lt;asp:UpdatePanel runat="server" ID="udpResults" OnLoad="UpdatePanel1_Load"&gt;
          &lt;ContentTemplate&gt;
              &lt;asp:HiddenField ID="currentLatLong" runat="server" /&gt;
              &lt;asp:HiddenField ID="triggerSearch" runat="server" Value="0" /&gt;
              &lt;asp:HiddenField ID="searchString" runat="server" Value="0" /&gt;
  
              &lt;asp:HiddenField ID="locationCode" runat="server" /&gt;
              &lt;asp:HiddenField ID="locationDesc" runat="server" /&gt;
              &lt;asp:HiddenField ID="locationPhone" runat="server" /&gt;
              &lt;asp:HiddenField ID="locationZip" runat="server" /&gt;
  
              &lt;asp:HiddenField ID="filterPickup" runat="server" /&gt;
              &lt;asp:HiddenField ID="filterVirtualKiosk" runat="server" /&gt;
              &lt;asp:HiddenField ID="filterDelivery" runat="server" /&gt;
              &lt;asp:HiddenField ID="filterAcceptsCash" runat="server" /&gt;
              &lt;asp:HiddenField ID="filterKey2Key" runat="server" /&gt;
              &lt;asp:HiddenField ID="filterHODService" runat="server" /&gt;
  
              &lt;asp:Label ID="tblResults" runat="server"&gt;&lt;/asp:Label&gt;
          &lt;/ContentTemplate&gt;
      &lt;/asp:UpdatePanel&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Does this help or would more code be required. 
  I am really stuck right now and do not know where to proceed.  </p>