Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

My javascipt code showing result in IE but now showing anything in mozila , whats the problem ?

more options

Hi everyone , i am trying to upload the text file contains on html page , code is working in IE but i cant say me Sir to use only IE , so is there any idea to let it work on mozila also ? code is here :

<html>
<head>
<script type="text/javascript" language="javascript">


function Read()
{
var Scr = new ActiveXObject("Scripting.FileSystemObject");
var CTF = Scr .OpenTextFile("C:\\Documents and Settings\\Administrator\\Desktop\\2011-03-02.txt", 1, true);
data = CTF .ReadAll();
data=data.replace(/\r?\n/g,"<br>");
document.write("<pre>" + data + "</pre>");
CTF .Close();
}
</script>
</head>
Hi everyone , i am trying to upload the text file contains on html page , code is working in IE but i cant say me Sir to use only IE , so is there any idea to let it work on mozila also ? code is here : <pre><nowiki><html> <head> <script type="text/javascript" language="javascript"> function Read() { var Scr = new ActiveXObject("Scripting.FileSystemObject"); var CTF = Scr .OpenTextFile("C:\\Documents and Settings\\Administrator\\Desktop\\2011-03-02.txt", 1, true); data = CTF .ReadAll(); data=data.replace(/\r?\n/g,"<br>"); document.write("<pre>" + data + "</pre>"); CTF .Close(); } </script> </head></nowiki></pre>

Muudetud cor-el poolt

All Replies (1)

more options

ActiveX is IE-only, you need the proper code for other browsers.

Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox.
http://forums.mozillazine.org/viewforum.php?f=25
You'll need to register and login to be able to post in that forum.