no, I think I did not made myself clear enough, sorry
I do this:

req = new Request().get('folder/file.html')

this is a relative path, so assuming the request works locally it does
not care too much where the files are located.
I want a fallback to the request in case the script is run not by url
but with open file from the browser, so i need to know if the request
is working or not



On Dec 16, 2:48 pm, "Steve Onnis" <[email protected]> wrote:
> well your request URL is in the ajax call so how are you pointing the call
> to the file?
>
> In any case, you can use indexOf() and look for http://
>
> for example
>
> if (location.href.indexOf("http://";) == -1) {
>         alert("file is local")
>         }
> else {
>         alert("file is remote")
>         }
>
> You can use the same sort of thing to detect if the file being called is a
> web server file or a local file system file
>
> Steve
>
> -----Original Message-----
> From: [email protected]
>
> [mailto:[email protected]] On Behalf Of hellspawn
> Sent: Wednesday, 17 December 2008 12:43 AM
> To: MooTools Users
> Subject: Request and local files
>
> Hi
> I know is not possible to make "ajax" on local files.
> Is there any way to detect if the request is working or the files are
> in a non-server environment -  if I can use this term - so if are just
> browsed on a local folder?
>
> Thank you

Reply via email to