473,320 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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>

Jul 23 '05 #1
1 1557
VK
<http://java.sun.com/docs/books/tutorial/applet/overview/security.html>

Assignment: read trough and memorize all points.

Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: aznFETISH | last post by:
I have had this on a page for a long time <span style="text-align:left;text-indent: 0em;line-height:12pt;font-family: futura, helvetica, arial, sans-serif;font-weight: normal;font-size:...
5
by: LRW | last post by:
(Sorry if this is a repost...my newsreader keeps crashing on the posting--I don't know if the message going out or not) For some reason this javascript just won't work in Firefox. It works fine...
1
by: francisco lopez | last post by:
hallo, I Have the following problem: I want to shake (earthquake-effect) the browser when someone hits the button. So I used the following script: ...
3
by: Bob | last post by:
I'm a total newbie at Javascript, but a programmer for over 20 years... so, my plans may be bigger than they are possible. I'm trying to set with Javascript the value of a form field... easy...
4
by: Laurent Compere | last post by:
Hi all, I try to make a logo fade in. I wrote the code below that is simple and supposed to be compatible with IE6,Firefox and Netscape. It works pretty well under IE6 but under Firefox and...
4
by: stevong | last post by:
It works on Konquerer though. I remember it works on IE too. I've tried window.close() too. Doesn't work on Firefox also. I've also tried to create a function. It doesnt work on Firefox also....
2
by: harishdixit1 | last post by:
Hello friends i developed a tollbar for Firefox browser. Now This toolbar contains a menu item. A web page will be opened by the user of the Toolbar. This Web page source code has included many .JS...
2
by: Poten Tate | last post by:
The script below doesn't bring the window to the front using Firefox2. Using IE7, it works fine. What am I doing wrong? Thanks. <script language="JavaScript"> <!-- /* tcwin is name of this...
2
by: Altman | last post by:
I have created an ascx control and I am calling registerclientscriptblock. The path to the js file is relative to the aspx page and not the ascx file. The function runs fine in IE7 but in...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.