Connecting Tech Pros Worldwide Help | Site Map

javscript won't read - firefox

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 23rd, 2005, 09:34 PM
carlbernardi@gmail.com
Guest
 
Posts: n/a
Default javscript won't read - firefox

Hi everyone,

I have to following code but I am not able to get it to work when the
data file does not have the same origin as the html file. Can anyone
help me out. The code was originally written for Netscape 4 which i
still have to test out.

Thanks,

Carl

<HTML><HEAD>
<SCRIPT language = "Javascript">
var data = new Array();
var i = 0;
var datafile = "http://www.yahoo.com";


var url = new java.net.URL(datafile);
var connect = url.openConnection();
var input = new java.io.BufferedReader(
new java.io.InputStreamReader(
connect.getInputStream()));
var aLine = ""
while((aLine = input.readLine()) != null) {
data[i++] = aLine;
}
</SCRIPT>
<BODY>

<SCRIPT language = "Javascript">


document.write("retrieveing<br>");
document.write(datafile+"<br>");
var temp = ""
for (var j = 0; j < data.length ; j++)
temp += data[j] + "<br>";
document.write(temp);

</SCRIPT>
</BODY></HTML>


  #2  
Old July 23rd, 2005, 09:34 PM
VK
Guest
 
Posts: n/a
Default Re: javscript won't read - firefox

<http://java.sun.com/docs/books/tutorial/applet/overview/security.html>

Assignment: read trough and memorize all points.

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.