Hi Stratboy,
Javascript is not designed to access local files , if that is possible
then there is now security in the in the internet. if that was possible
,every website could have accessed local drive files.
What you can do is to have a file upload option done with PHP and Moo tools,
To make it simpler , you can use moo tools drag and drop library to
upload files.
Once uploaded , you can access the file using the http://
localhost/uploadfolder/filename.xml.
Mootools can now read it and process it.
David walsh have done a great job by providing a demo for this in his blog.
http://davidwalsh.name/mootools-upload
Hope this works.
Thanks
Clain
On 10/20/2011 9:11 PM, stratboy wrote:
Yes, accessing via localhost, but if I merely drag my page to a
browser or maybe run a preview from bbedit, or automatically open it
from a cd-rom, thus having a file:// protocol, it doesn't work.
jquery works. I wanted to know if there's any way to mimic this jquery
feature with mootools.
On 15 Ott, 22:14, Fli7e<[email protected]> wrote:
Request will request files from within the same domain you are running
the Script on.
So why it shouldn't work with a "local" xml file? What Mootools not
have in it's core/more is some real XML Parser but you can use
Request.HTML and access the DOM which has been discussed on another
thread
http://groups.google.com/group/mootools-users/browse_thread/thread/22...
So if you use Request.HTML and target it to a path beeing accessable
from the Browser under the actual Domain you are working within
(localhost/ or 127.0.0.1/) you should be able to retrieve the XML and
access the DOM (not like if you would use JSON but it should work).
On 11 Okt., 16:04, stratboy<[email protected]> wrote:
Hi! I've just found (and tested) that with jquery I can load and parse
an xml document locally. I mean, I can do it without publish the files
to a server. So, for example, I can make a local site to be burn on
and loaded from a cd-rom (and that's exaclty what in fact I've got to
do). I think this is not possible with mootools, since Request doesn't
work locally. Am I wrong? Hence, is there a way to do the same thing
as jquery?