I am trying to write a bookmarklet that extract a citation information from a web page in a new text file for the client by using javascript.

but I could not find any solution where writing to a text file is allowed with firefox by using javascript.

the application suppose to be run on the client side only.

any suggestions?

If you are talking about writing to client's local storage, not sure there would be any that do it with JavaScript. The reason is JavaScript is not allowed to access local storage for security reasons. You are not only trying to access local storage but attempting to write content, this would not be able to do with JavaScript alone in FF (in IE, ActiveX can do but still require client's permission).