473,324 Members | 2,313 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,324 software developers and data experts.

Applets vs JavaScript -- file I/O in public terminals

I'm going to write a client-side web app that deals with local files. This
web app targets mainly public or corporate browser terminals. Normally I
would write an Applet because that's what I know (and because of Java's
extensive library of functions), but I've found that there are many
headaches dealing with Applets in that kind of environment. Not every IT
department installs the Sun JRE and it is usually difficult if not
impossible for the user to do so on that machine if doing so requires admin
priveleges. So I considered switching to JavaScript instead. However I am
wondering how difficult it is to implement file I/O in JavaScript, seeing as
to how the ECMA standard has no such provisions and the tutorials I've seen
on the web indicate that I/O exposure varies from one browser to the next.
If anyone out there has had experience with file I/O in this type of
environment, I'd like to know how much of a headache it is to use
JavaScript.
Aug 25 '05 #1
1 2202


Kevin C. wrote:
I'm going to write a client-side web app that deals with local files. This
web app targets mainly public or corporate browser terminals. Normally I
would write an Applet because that's what I know (and because of Java's
extensive library of functions), but I've found that there are many
headaches dealing with Applets in that kind of environment. Not every IT
department installs the Sun JRE and it is usually difficult if not
impossible for the user to do so on that machine if doing so requires admin
priveleges. So I considered switching to JavaScript instead. However I am
wondering how difficult it is to implement file I/O in JavaScript, seeing as
to how the ECMA standard has no such provisions and the tutorials I've seen
on the web indicate that I/O exposure varies from one browser to the next.
If anyone out there has had experience with file I/O in this type of
environment, I'd like to know how much of a headache it is to use
JavaScript.


With JavaScript in a HTML documente loaded in a browser it is usually
very difficult to access the local file system of the machine the
browser is running on.

If your HTML document is loaded via HTTP then with normal security
settings there should not be any access to the local file system
possible, unless you do things like signed script.

If your HTML document is loaded from the local file system then there
might be some chances to access the local file system but file I/O is
usually not something the browsers itself expose to script.

So with IE/Win you would rely on using the ActiveX component
FileSystemObject and with normal security settings I think IE will ask
the user to allow to create that object. And with IE on Windows XP SP 2
script and ActiveX is even disabled in the local file zone, the document
is loaded without executing that stuff and the user would need to click
in a warning bar coming up to allow and trigger reloading the page and
execute script.

With Opera you would rely on LiveConnect calls to Java to do file I/O so
you would need the SUN JRE on the client anyway.

With Mozilla you would need XPConnect access which even if your HTML
document with the script is loaded from the local file system requires
your script to ask the user for the privilege and the user to grant that.

Thus if you really need general file I/O on the client then script in a
HTML document loaded in a browser is not the way to go I think, you will
need to install some normal app on the client.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Aug 25 '05 #2

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

Similar topics

0
by: Martin | last post by:
Hi All, I am a relative newbie to Java / Applets, but am despirately after some help ! I have got the following code, which is basically a listing with button items along the sides, allowing...
12
by: Wladimir Borsov | last post by:
On one of my web pages there is an java applets which works fine on my computer. However I noticed on some other computer that the run of java applets are disabled. I got an error message...
4
by: Neil Cherry | last post by:
I've seen references to using <applets ... > and document.applets to access public Java functions from Javascript. Do I still use document.applets with <object ...>? BTW, the FAQS page seems to...
0
by: Jonathan Seidner | last post by:
Hi, I know there is a way to embed a .net control into a web page using the object tag. this object's properties and methods can then by accessed by javascript code in the html page. what i'm...
2
by: Robert Larsen | last post by:
Hi I am developing Java applet games and have come across a problem that seems to exist in the VM from Sun. I have tested in Mozilla and Firefox on Windows and Linux and IE (several versions) on...
1
by: jindalily | last post by:
Hey guys, I wasn't completely sure if this would be a Java or JS topic, but I thought it had more to do with Ajax and whatnot. Anyway, I have an embedded and signed Java applet on my page like so:...
2
nomad
by: nomad | last post by:
I'm starting to study Applets and I have made a small Applet that products a clock. When I publish (drag the HTML file) to a internet provider I get an error message. This is what I have 1. I have...
0
by: gotnspikes | last post by:
I am trying to create an applet using SitePad Pro. I am a college student and have a lab where I need to create applets. I did it in class just fine. I tried to run a "Hello World!" applet and it...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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...
1
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.