avoid dialog box when netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); is

Posted by ganapati on Stack Overflow See other posts from Stack Overflow or by ganapati
Published on 2010-05-03T12:39:33Z Indexed on 2010/05/06 6:48 UTC
Read the original article Hit count: 435

Filed under:
|
|

Hi i got to create.write,read a local file within the javascript using XPCom. For that i have included the below line at the beginning of javascript.

netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");

But when the above script executes, a dialog box appears saying

  **Internet security** 

   A script from "file://" is requesting enhanced abilities
   that are UNSAFE and could be used to compromise your machine or data:
   Run or install software on your machine
   Allow these abilities only if you trust this source 
  to be free of viruses or malicious programs.
      ______       _______       
     | Deny |     | Allow |
     --------     ---------  

But i dont want the dialog box to be appeared.How can i avoid it?. Thanks.

© Stack Overflow or respective owner

Related posts about mozilla

Related posts about JavaScript