Hi.
I've created a new protocol using javascript for my xulrunner app and would 
like to redirect the browser element to a local file.

Using:

return ios.newChannel("javascript:document.location.href='file:///c:/test/New 
Text Document.txt';", null, null);

I get a stack of security errors:

   Security Error: Content at 
javascript:document.location.href='file:///c:/test/New Text Document.txt'; may 
not load or link to file:///c:/test/New%20Text%20Document.txt.
   Error: Access to 'file:///c:/test/New%20Text%20Document.txt' from script 
denied
Source File: javascript:document.location.href='file:///c:/test/New Text 
Document.txt';
Line: 1
   Error: uncaught exception: [Exception... "Component returned failure code: 
0x80004005 (NS_ERROR_FAILURE) [nsIDOMLocation.href]"  nsresult: "0x80004005 
(NS_ERROR_FAILURE)"  location: "JS frame :: 
javascript:document.location.href='file:///c:/test/New Text Document.txt'; :: 
<TOP_LEVEL> :: line 1"  data: no]
How do i get this to work? Is it a preference I have to change or what?

Thanks,
James



----------------------------------------------
James Newell
[EMAIL PROTECTED]


                
---------------------------------
Do you Yahoo!?
  Listen to your personal radio station on Yahoo!7 Music 
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to