[Jslib] Error: File is not defined

roger roger at mondego.net
Wed Jun 2 17:34:50 EDT 2004


Hi when i try to open a local file that exists i get the following error:

Error: File is not defined

here is the code:

function teste()
{
	netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
	include('chrome://jslib/content/io/file.js');
	var f=new File('/home/roger/teste.txt');
	var contentFrame = document.getElementById('mdg_moz_main');
	var texto="This is a test!\n";
	f.open('w');
	f.write(texto);
	f.close();
}

if anyone can give me a tip about why this is not working or a way to 
dump the error msgs into the javascript console

thank you in advance,

Roger



More information about the Jslib mailing list