I use Coda 2 which has a built-in browser. Here's a code:
$('#mtbLink').click(function() {
$("#loadHere").load("file:///Volumes/Macintosh%20HD/Applications/XAMPP/xamppfiles/htdocs/another/test.html #loadThis")
});
It works in Coda browser, but doesn't work in Safari, Mozilla and Yandex.Browser (chromium-based browser). How can I fix it?
You cannot make AJAX requests to the local file system. To test this in FF/Chrome etc. you need to place your test.html file on an accessible webserver.
Related
This img path working IE but not in chrome and firefox. However if I use same img path in any browser url it works. src="file:///C:/Users/d4katas/Documents/image/Test.jpg"
Is your web page being served from a file server? If so then your cannot call out a local file on your computer as an img src. Try moving the image file into your web server and src'ing it appropriately from there instead.
IE might be working because... well, it's IE... it tends to do things that it shouldn't. :)
Tried this:
Download Your Foo
Chrome unfortunatelly completely ignores the download attribute.
What can I do? Ideally to make it cross-browser...
Thanks
Have you tested this on any other web browsers.
According to w3schools here, it is an HTML5 attribute and internet explorer and safari do not support it. So, if you are looking for cross-browser, this probably isn't the best solution.
Also the link you have composed is wrong, if you downloaded google.com it points to index.html(I checked) .
I tried <a href="http://www.google.com" download>Here</a> and opened it in the latest chrome and it downloaded index.html. So if you need google chrome compatibility do a download attribute with "[your choice].html".
If you would like cross-browser compatibility I suggest you use php to change the headers then echo google's source. If you are unfamiliar with php go to
here
I have the following code in a html document:
<p>PDF sample</p>
<object data="http://www.whateverdomain.com/whatever/~/media/sample.pdf" type="application/pdf"></object>
This is working in IE, Firefox but not in Chrome. Appears a grey box in the browser with no embedded pdf. When I check on "network" tab in chrome I'm receiving a HTTP 200 response but PDF is not shown.
I tried URL encode tilde "~" symbol replacing it by %7e but still its not working on Chrome.
I don't have the possibility of changing the url which is provided by an external service.
Do you have any clue on how to solve ?
You might wish to try and use a simple iframe. At the very least I am pretty sure that works for chrome, might not work for IE though. Another alternative is using the Google Docs viewer, with that you are sure to be cross browser compatible, although some pdf's might not render perfectly. The last option you have is using something like pdf.js to render the pdf's yourself inside the browser. Gives you a lot of control and ensures that even people running computers without a pdf viewer installed (or a native pdf viewer like chrome and firefox) will be able to view the file.
I'm trying to get LiveReload to work with a local website I'm coding for now, but it won't seem to work. On non-local pages, the extension icon is clickable and all, but for local files, it's not: http://i.imgur.com/qrMDo.png
Does it not work with local files? I have it added within the app. Or does it not work with ML? It works if I add the script to the HTML file, but I'd prefer not to.
It seems to me that it is a bug.
It was reported here. I have exactly the same problems in Safari.
Just use different browser, if you can. It works great in Firefox for me.
I would like to make a link from a web page to a file on a local filesystem and make it work in all browsers (or at least in Internet Explorer, Firefox and Chrome).
For example, the following works in Internet Explorer:
Info here
but not in Firefox and Chrome.
Is there a way to make a link that works in all browsers?
Or a way to use javascript to detect which browser it is and then display the appropriate link based on the filename?
Links to local files on pages that were retrieved via HTTP(S) are deliberately disabled in Mozilla/Firefox, because they can be a security risk, and have been used in attacks in the past.
You can override this behaviour, however. For details, see this article in MozillaZine.
try prefixing your url with file:///