0

I want my page to do requests to a special app (named QuickBooks web connector) on local comp.

Like this: qbwc://docontrol/WSExists?AppName=WCWebService

I have this function:

function CheckQWCLoaded() 
{
    var strURL = 'qbwc://docontrol/WSExists?AppName=Quickbooks+to+eUnify+Integration';
    var CheckResult = false;
    jQuery.ajax({
        url: strURL,
        dataType: "json",
        complete: function (XMLHTTP) 
        { 
            // Response should be a string True/False
            // if (XMLHTTP.status == 200) CheckResult = jQuery.parseJSON(XMLHTTP.responseText);
        }
    });
    return CheckResult;
}

When I run it in IE: I get something like 'Access denied', Chrome returns some different error. I understand that it is related to cross domain and scheme restrictions, just want to know if it is possible to do it or should I create a small (.net) windows app instead of running it from web page.

Cœur
  • 37,241
  • 25
  • 195
  • 267
SlavaTT
  • 88
  • 9
  • Does the service implement [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS)? If not, you will probably have to write a proxy to get around that limitation. – epascarello Oct 29 '14 at 17:09
  • Did u try jsonp request? [stackoverflow.com/questions/5943630/basic-example-of-using-ajax-with-jsonp](http://stackoverflow.com/questions/5943630/basic-example-of-using-ajax-with-jsonp) – K Neeraj Lal Oct 29 '14 at 17:13
  • Its a browser plugin that handles qbwc: right? I doubt Javascript in the browser sandbox is allowed to see that. Plus this might not even be HTTP, or anything like it, its just not doable without some kind of external http service that can translate to qbwc. Or I'm wrong. – Spacedman Oct 29 '14 at 17:20
  • Sorry, I didn't read docs fully. It is an "asynchronous pluggable protocol handler", working under IE. – SlavaTT Oct 29 '14 at 17:32
  • I really doubt JS can work with it. Or I could send you to a page I control with some JS that went to `qbwc:/transfer/$1000/SlavaTT/to/Spacedman` (hypothetical example). Giving JS access to browser plugin schemes is opening a whole world of pain, bugs, security exploits and system holes. So yeah IE probably does let you do it. – Spacedman Oct 29 '14 at 17:38
  • ok,thanks, will be reading more on it – SlavaTT Oct 29 '14 at 17:46

0 Answers0