opening text files with javascript


 
Thread Tools Search this Thread
Top Forums Web Development opening text files with javascript
# 1  
Old 03-02-2009
opening text files with javascript

Im aware under IE, javascript uses ActiveX Objects to open up and manipulate text files, excel files etc..

How abouts would I open a text file using javascript in Firefox ?

thanks
# 2  
Old 03-02-2009
Normally, you can't read files from filesystem with browser-based scripting, because allowing this is a huge security risk as Internet sites can now read files on your system!

However, I am aware that Netscape browsers (including Mozilla, Firefox) are designed with a "security manager" that allows browser user to specifically override certain security policies on their system. I'm not too familiar with these though.

I think some of the links on this page are relevant:

https://developer.mozilla.org/Specia...ty&language=en

However, it is important to note that even by tweaking the security manager you will still likely not be able to do things you can with IE because there is no comparable infrastructure as ActiveX in Firefox. At least I don't think you will get anything that allows you to manipulate an Excel spreadsheet.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

^H characters appear when opening text file using vi - RHEL

Version Info: $ cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.8 (Tikanga) $ $ uname -a Linux stryker138 2.6.18-308.13.1.el5 #1 SMP Thu Jul 26 05:45:09 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux I redirected manpage of ksh command's output to a text file as shown... (6 Replies)
Discussion started by: kraljic
6 Replies

2. Shell Programming and Scripting

Removing obfuscated javascript from js files

ello, I am trying to remove obfuscated code in multiple files on a server, the malicious code is surronded by /*km0ae9gr6m*//*qhk6sa6g1c*/ I had success removing from some files using this command sed -i ':strt;s|/\*km0ae9gr6m\*/*/\*qhk6sa6g1c\*/||g;/\/\*km0ae9gr6m\*\//{N;b strt}'... (5 Replies)
Discussion started by: cuantica
5 Replies

3. Programming

help with opening files and reading them in C

In C, given a name or path to a file, how do I check if the path is valid, and how can I check its permisions will let me read from it, and how do i check if its an empty file? (15 Replies)
Discussion started by: omega666
15 Replies

4. Shell Programming and Scripting

recursively remove javascript from all folder index files

Hi All, A site I manage had some javascript inserted into each folders index file. Can anyone priovide me with some ideas on how to use awk, sed or some other bash script to parse through each of the site folders and remove this code? If I have to do it by hand I'm going to go insane. :eek: ... (2 Replies)
Discussion started by: lsalsich
2 Replies

5. UNIX for Dummies Questions & Answers

Urgent help needed to delete some text without opening the file in unix

Hi To delete some text in 2 files in line1 ( not complete line) in unix without opening the files. For example: source file is like this <?xml version="1.0"... (5 Replies)
Discussion started by: pyaranoid
5 Replies

6. Shell Programming and Scripting

How to delete a particular text without opening the file.

Hi, Could someone tell me how to delete a particular text inside an existing file without opening the file? e.g. I have a text file called mytext.txt which contains three lines of text below and I want to delete “ ;” and delete the second line “b ;” including the carriage return. a ; b ; c ;... (12 Replies)
Discussion started by: stevefox
12 Replies

7. UNIX for Dummies Questions & Answers

Opening files

I am very new to unix. I want to open a file and read one line in at a time. Can anybody help? (3 Replies)
Discussion started by: saarshad001
3 Replies

8. UNIX for Dummies Questions & Answers

Opening Files

I'm a new to UNIX/LINUX. I just put cygwin on my laptop and I can navigate around the directories, but I can't open files (.doc, .ppt, .html or .exe). Is there an explicit command to do this? I know that in Solaris when it does not recognize the file, it brings up the list of available viewing... (4 Replies)
Discussion started by: AJA
4 Replies
Login or Register to Ask a Question