views:

32

answers:

0

Hi , I am developing Firefox extension that will extract bibliographic information from specific website , and when the user press a button on firefox"the extension" a new window should appear with the bibliography data.

my problem is I opened a new window with JS and write to it with the normal JS code :

NewWin=window.open("","NewWin","toolbar=no,status=no,width=600,height=200");
  NewWin.document.write("<b>Test</b>");

but I've got an error

Error: uncaught exception: [Exception... "Security error"  code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)"  location: "chrome://custombutton/content/button.js Line: 5"]

any suggested solution on how to open a new window and to write to it a new information and to extract information from a document.

I have tested my code on bookmarklet , and when I wanted to converted to firefox extension I faced these problem.

this is my first time to develop an extension. so any help I really will appreciate it.

thank you.