Welcome Guest Search | Active Topics | Sign In | Register

Not allow to load any file dynamically? Options
ssingh
Posted: Wednesday, January 22, 2014 9:40:09 AM
Rank: Newbie
Groups: Member

Joined: 1/17/2014
Posts: 4
Hi,

EO Browser won't allow me to load any file using JavaScript.

function loadFileToElement(filename, elementId)
{
var xmlHTTP = new XMLHttpRequest();
try
{
xmlHTTP.open("GET", filename, false);
xmlHTTP.send(null);
}
catch (e) {
window.alert("Unable to load the requested file.");
return;
}

document.getElementById(elementId).innerHTML=xmlHTTP.responseText;
}

This thing not work and never give me any error


The other issue is, I can't access flashMovie object using EO.Browser

for example

var flashMovie = getFlashMovieObject("comTest");
alert(flashMovie); //Run till this line successfully
flashMovie.showAlert("test"); //Fails here without any reason or error


Thanks,
eo_support
Posted: Thursday, January 23, 2014 12:04:12 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

For security reasons, you can not access a local file from a non-local Web page. This behavior is by design. Otherwise people would be able to put out a web page online and as long as they can some how lure you to visit their page, they would be able to collect whatever file off your computer. Obviously that can not be allowed.

If you do need to access local files from a non local web page, you can implement a custom protocol, then load the file from your custom protocol handlers. See here for more information about implement a custom protocol:

http://www.essentialobjects.com/doc/6/advanced/resource_handler.aspx

As to the flash movie object, I am not sure where your showAlert function is defined. If you can tell us where that function is defined, we will be able to look further for you.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.