1
I am trying to use this Jquery function but it is not working properly because it shows me nothing.
<script>
$("#minha_div").load("Noticias.html");
</script>
<div id="minha_div" width="550" height="400" style="position: absolute; left: 1%; top: 39%;"></div>
On the console appears:
Xmlhttprequest cannot load. (File path) Cross origin requests are only supported for Protocol schemes: http, data, Chrome, Chrome-Extension, https, Chrome-Extension-Resource.
The error message itself already says: you should add the protocol, full path, for example:
"http://seusite.com/Noticias.html"
– Franchesco
Correct, but for example now I am testing only on the computer an offline page. There is a way to see the page?
– ChrisAdler
Straight from the file system, no server, do not know if it works with the function
load()
. I really can’t tell you:(– Franchesco
That div later I can change the size to look like an iframe?
– ChrisAdler
putting this div first and this script later would not be correct?
– SneepS NinjA
Loading vis script files from the local computer is not allowed for security reasons. Imagine what someone could read by giving them a simple HTML!
– utluiz