Hi Again...still trying to sort this out - I read in another thread, that
since I am trying to read from a local file...I shouldn´t be having
cross-domain issues..... so....
Im the online TW I have the code
<script>
var out="";
var xmlHttp = null;
xmlHttp = new XMLHttpRequest();
var discFile="/AAA/alunoParticipation.txt";
xmlHttp.open( "GET",discFile, false);
xmlHttp.send( null );
var returnText =xmlHttp.responseText;
................</script>
it works....
but when I put the same code, but with an external url..like this...
<script>
var out="";
var xmlHttp = null;
xmlHttp = new XMLHttpRequest();
var discFile="http://my domain/AAA/alunoParticipation.txt";
xmlHttp.open( "GET",discFile, false);
xmlHttp.send( null );
var returnText =xmlHttp.responseText;
................</script>
I get the message - [Exception... "Failure" nsresult: "0x80004005 (
NS_ERROR_FAILURE)" location: "JS frame ::
file:///X:/Documents/Dropbox/beta.htm :: _out :: line 9681" data: no]
Anyone have ideas whats happening...whay cant I read from a local file???
Thanks in Advance
Skye
Em quinta-feira, 22 de novembro de 2012 10h09min28s UTC-2, skye riquelme
escreveu:
>
> Hi All
>
> I have a eLearning platform running fairly well directly online, based on
> UploadPlugin and the use of some php scripts to store online data in simple
> txt files....
>
> Now I need to consider students who do not have continual online access
> (still quite a reality in Brasil) and who need to study using my platform
> in offline (USB) mode. My thinking is that when a student is connected, to
> download the server-side txt files to the USB (probably svae them in
> localStorage as well)........ to store offline additions in another
> localStorage and to re-integrate this new data when the student re-connects.
>
> My problem is downloading the server-side txt files to a local TW - seems
> I am hitting cross-domain problems.
>
> Online I use a code like -
> <script>
> var out="";
> var xmlHttp = null;
> xmlHttp = new XMLHttpRequest();
> var discFile="/someTextFile.txt";
> xmlHttp.open( "GET",discFile, false);
> xmlHttp.send( null );
> var returnText =xmlHttp.responseText;
> var lines=returnText.split("#\n");........
>
> to get the data from the txt file....but using this from the offline TW
> does not work.....the data is not passed to the offline TW !!!
>
> How to get around this? How to get the txt data from the server to the
> offline TW???
>
> Thanks in Advance
> Skye
>
>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/tiddlywiki/-/jJQ7WEqqH_QJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tiddlywiki?hl=en.