Przeszukaj pomoc

Unikaj oszustw związanych z pomocą.Nigdy nie będziemy prosić Cię o dzwonienie na numer telefonu, wysyłanie SMS-ów ani o udostępnianie danych osobowych. Zgłoś podejrzaną aktywność, korzystając z opcji „Zgłoś nadużycie”.

Learn More

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

  • 1 odpowiedź
  • 1 osoba ma ten problem
  • 1 wyświetlenie
  • Ostatnia odpowiedź od the-edmeister

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>

Zmodyfikowany przez cor-el w dniu

Wszystkie odpowiedzi (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.