Not allowed to load local resource a href - resources

I have following code :
The files are on O drive resides on server.
Using normal html tag a with href .
Click here to see code
But getting Error in browser console :
Not allowed to load local resource: file:///O:/Appdata/rfms/Ref_Docs/Refinery%20East/RDS/Unit%20081/FER/TSS%20Scanned%20Documents/C-1232/C-8110%20CERTIFICATE%20%20OF%20SHOP%20COMPLIANCE%2002-17-12.PDF
I have tried many solutions like window.open , --allow-file-access-from-files in chrome . But nothing working for me. The application is in ASP.NET MVC

Related

Firefox OS - Launch external link inside Firefox OS app and retrieve its content

I have a Firefox OS app in which I have opened an web page via mozbrowser attribute.
<iframe id="inlineFrameExample"
mozbrowser=true
src="<some external link>"
</iframe>
How can we retrieve DOM content of the iframe?
You can retrieve DOM content via executeScript() method present in Browser API. It will run the script against the iframe and will allow you to do DOM computation tasks.
Note: The example mentioned in the document didn't worked but the syntax given below worked for me. The diff is is passed as string.
iframe.executeScript('put_your_script_here', {origin: 'domain_name'});

Xamarin HybridWebView always opens in Browser with xamarin.iOS when using Appcues script

When i check in the script from Appcues then i see it trieds to embed an iframe to my body element.
I can see that adding an iframe with <iframe src="https://www.google.com"></iframe> in my website. That iOS apps opens to the native browser to google immediately. The same result when adding an Appcues script.
I can ignore the navigate to google url but if i do that for Appcues. Appcues doesn't get shown in my app. This works fine on Xamarin.Android

Controlling a web page, casperJS like : can that be done with chrome extension?

I am trying to develop a chrome extension to automtize some tasks on the web (fill form, go to next page, extract data...)
The idea is to develop a kind of http://casperjs.org/ as chrome extension.
I am injecting some JS to an active tab.
JS is run, and everything works fine: problems raise when I navigate to a new url.
When the page navigates to new url (document.location for instantce), the JS stops running since it is unloaded.
My idea would be to store the JS state and resume it once page has loaded:
ex content of source variable: I inject it in background to the web page.
for (i = 0;i < 5;i++) {
document.location = "http://www.example.com/page"+i;
waitUntilPageIsLoaded();
var source = $("body").html();
extractData(source);
}
chrome.tabs.executeScript(null, { code: source });
Of course this does not work since we change the location of the page.
Or more generally speaking, can casperJS can be developped using google chrome extension ?

Using OAuth dialog for facebook app do not allow to use canvas URL as redirect_uri

I am starting a Facebook app. Following the Getting Started tutorial in the Authorization section, it says I should use this URL to get permission from users:
https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=YOUR_CANVAS_PAGE
I am replacing YOUR_CANVAS_PAGE with my canvas URL, the one I see on my app settings:
https%3A%2F%2Fapps.facebook.com%2F238620302882463%2F
But, then, if I navigate to that page, I get the following error:
An error occurred with Elecciones 2012. Please try again later.
API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: Invalid redirect_uri: Given URL is not allowed by the Application configuration.
If I replace YOUR_CANVAS_PAGE with:
http%3A%2F%2Fwww.example.com%2FElecciones2012
The permission dialog works fine. But then I get redirected to my website, not the app inside facebook.com
Any idea why is this happening??
I have seen other apps using a different permission dialogue:
http://www.facebook.com/connect/uiserver.php?app_id=11609831134&method=permissions.request&redirect_uri=http%3A%2F%2Fapps.facebook.com%2Fpetsociety%2F%3Fpf_ref%3Dsb%26ref%3Dts&response_type=none&display=page&perms=email%2Cpublish_actions&auth_referral=1
But it looks it is part of another set of APIs.
I got the same problem too. Looks like the problem is in "Canvas URL". You cannot use your app id in canvas URL like:
"https%3A%2F%2Fapps.facebook.com%2F238620302882463%2F"
Instead, the namespace should be used as your canvas URL. for example:
"https://apps.facebook.com/myapplication/"
You can set your app namespace in the application settings in facebook.

Google docs viewer not working

Using this code:
<iframe height="780" src="http://docs.google.com/viewer?url=http://ruh.kz/sites/default/files/doc/ritorika.pdf&embedded=true" style="border: none;" width="600"></iframe>
But all the time im getting this annoying message:
Sorry, we are unable to retrieve the document for viewing or you don't have permission to view the document.
By the way, i have read about ISP might block google docs. But i've checked another sites with google docs viewer and they seemed to work perfectly.
to embed your pdf without putting it in your server , just login to your gmail and upload it in google docs then copy the link and put it in your iframe's src
first you try with online version to view your file if it shows your file,you gave wrong url to iframe,if viewer does not show your file at embedded version and online version check your file size,file url and file permissions to viewer can reach your document.You can try your url, for example http://www.foo.com/bar.pdf paste in your browser,if url is right browser shows the file...

Resources