Note that there are some explanatory texts on larger screens.

plurals
  1. POnslXMLHttpRequest.send failing when used in XPiNC
    primarykey
    data
    text
    <p>I have an iNotes List view object which lists the documents I want, and the related REST components. In the "OnSelectEntry" method I have the following code. </p> <pre><code>var unid = items[0]["@unid"]; var myUrl = "test.nsf/main.xsp/docPathInfo/unid/" + unid; var h; if (window.XMLHttpRequest){ h = new XMLHttpRequest(); } else { h = new ActiveXObject("Microsoft.XMLHTTP"); } h.onreadystatechange=function() { if (h.readyState == 4 &amp;&amp; h.status == 200) { var myObject = eval('(' + h.responseText + ')'); var result = dojo.byId("#{id:inputText1}"); result.value = myObject.field1 + " " + myObject.field2; } } h.open("GET",myUrl,false); h.send(); </code></pre> <p>This code works perfectly if the NSF is hosted on a server, but if I have it local it fails with the following: </p> <pre><code>uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nslXMLHttpRequest.send]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://127.0.0.1:50113/xsp/.ibmxspres/.mini/dojo/.en/@Wc&amp;@Eab&amp;@Eya&amp;@lu.js :: anonymous :: </code></pre> <p>I need this to work on the client. Is this the correct way to make the call back on the client? </p> <p>I have tried changing the ACL access as well but it doesn't appear to help. I've also tried a absolute URL instead of a relative one. </p> <p><strong>[Update]</strong></p> <p>I tried changing to a Dojo call instead as follows. </p> <pre><code>var x; var myCallback = function(data, ioArgs) { var myObject = eval('(' + data + ')'); var result = dojo.byId("#{id:inputText1}"); result.value = myObject.field1 + " " + myObject.field2; } dojo.xhr("Get", { url: myUrl, handleAs: "text", timeout: 10000, load: myCallback }); </code></pre> <p>When I run this code, it works fine on the server but when I run it on the client it doesn't work. I get the following message in the XPages.log file. </p> <pre><code>1/10/13 10:45 AM: Internal warning: Check access being called outside of a request 1/10/13 10:45 AM: Internal warning: Check access being called without a valid session/database </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload