Discussions

 View Only
  • 1.  Javascript throwing error in IE. Works ok with Chrome.

    Posted 05-24-2017 14:49
    I am calling the DoQuery() and AddRecord() APIs from the JavaScript. It works like a charm in chorme, However, its throwing me error in IE.The error it throws on the console: : 'XPathEvaluator' is undefined. Any ideas on how to get this working?

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">;
    <html>
     <meta http-equiv="X-UA-COMPATIBLE" content="IE=Edge,chrome=IE8,IE10">
     <body>
      
      <script type="text/javascript" src="/js/QuickBaseClient.js"></script>
      <script type="text/javascript">

       var qdb = new QuickBaseClient();
       qdb.SetAppToken("apptoken");

       var fun= function() {
       
       var rrid= qdb.parseQueryString();
       
       if((rrid['rid'] == "")) {
         alert("Error, undefined variables present");
         return;
        }

       var rid=rrid['rid'];


       var queryString  = "{fid.EX."+rrid['rid']+"}";
       
      //Do Query

    //Add Query


     
       };
       
       fun();


       
      </script>

     </body>
    </html>


  • 2.  RE: Javascript throwing error in IE. Works ok with Chrome.

    Posted 06-08-2017 21:07
    Still unable to find a solution to this. Shoutout to experts on javascript


  • 3.  RE: Javascript throwing error in IE. Works ok with Chrome.

    Posted 06-09-2017 00:38
    Short answer is don't use QuickBaseClient.js - it is archaic in many ways and isn't really even supported by QuickBase.

    An answer from 2004 states:

    Internet Explorer is the only browser that now doesn't support XPathEvaluator. You can use selectNode() and selectSingleNode() on the DOM Document object instead (IE only).

    All of these constructs are outdated even if the browsers may support them.

    For what is it worth I can log XPathValidator in the console of Chrome, Firefox and Edge but I can't test on IE browsers. So try Edge instead of IE if you are on a Microsoft box.