473,320 Members | 1,695 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.

File I/O Operation

dmjpro
2,476 2GB
Could I get any good link of File I/O operation for cross browser?
Please help!
Jul 24 '08 #1
16 2647
gits
5,390 Expert Mod 4TB
could you give a short example or use case for what you want to do ... just to understand your requirement corrcetly?

kind regards
Jul 24 '08 #2
rnd me
427 Expert 256MB
Expand|Select|Wrap|Line Numbers
  1. function IO(U, V) {
  2. //LA MOD String Version. A tiny ajax library.  by, DanDavis
  3.     var X = !window.XMLHttpRequest ? new ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest();
  4.     X.open(V ? 'PUT' : 'GET', U, !1);
  5.     X.setRequestHeader('Content-Type', 'text/html')
  6.     X.send(V ? V : '');
  7. return X.responseText;}
see usage notes here
Jul 24 '08 #3
dmjpro
2,476 2GB
could you give a short example or use case for what you want to do ... just to understand your requirement corrcetly?

kind regards
Basically i need to create,update,delete,read a file on the local file system when my web page loads into browser.
Jul 25 '08 #4
rnd me
427 Expert 256MB
you hill have to use another language than javascript unless the page is run from the same drive/folder as the files you want to manage.
Jul 25 '08 #5
dmjpro
2,476 2GB
you hill have to use another language than javascript unless the page is run from the same drive/folder as the files you want to manage.

Can't I specify the absolute directory?
Jul 25 '08 #6
gits
5,390 Expert Mod 4TB
no ... that is not possible either ... you could use a filepicker control to let the user upload/choose a file and the user should download a file and he could decide where to save it ... you might ask the user for the location and save that with his user-id and then retrieve it from a database before building up the page serverside ... for a kind of workaround for your problem :)

kind regards
Jul 25 '08 #7
rnd me
427 Expert 256MB
is IE only compatibility ok with you?
Jul 25 '08 #8
gits
5,390 Expert Mod 4TB
not with me ;) ... (but i think i know what you want to suggest) ...

kind regards
Jul 25 '08 #9
dmjpro
2,476 2GB
is IE only compatibility ok with you?
But i saw a IO library in Mozilla ...
Though I didn't test it ... Just i wanted to know from experts that whether it is possible to do cross browser file I/O operations in JavaScript?

Anyway thanks for all responses .. :-)
Jul 25 '08 #10
gits
5,390 Expert Mod 4TB
nope ... there is no cross-browser way that i'm aware of ... only browser-specific ways ... or workarounds with serverturnarounds ...

kind regards
Jul 25 '08 #11
dmjpro
2,476 2GB
nope ... there is no cross-browser way that i'm aware of ... only browser-specific ways ... or workarounds with serverturnarounds ...

kind regards
Sorry Gits ... I was not looking for common JS function ....
Anyway i will try out for both IE and as well as in Mozilla ..... I think for these browsers i have to specific code.

Thanks Gits ..!
Jul 25 '08 #12
gits
5,390 Expert Mod 4TB
i assume for IE there is some ActiveX-control combined with some security-settings available and in MOZ/FF you would need to set specific privileges to the script ... what makes it hard for use in a public page ... but i guess you need it for an internal application?

kind regards
Jul 25 '08 #13
dmjpro
2,476 2GB
i assume for IE there is some ActiveX-control combined with some security-settings available and in MOZ/FF you would need to set specific privileges to the script ... what makes it hard for use in a public page ... but i guess you need it for an internal application?

kind regards
What do you mean by internal Application?
Here i am using Java so should i use here Applet? :-)
Jul 25 '08 #14
gits
5,390 Expert Mod 4TB
with internal application i mean an intranet or local app ... but not a public webpage

what to use depends on the usecase ... i think i wouldn't use a java-applet just for the purpose of reading/writing a file but of course it is an option ... a webpage basicly shouldn't need to work with local files, and more important ... when it needs it ... the user must! have control over it and it shouldn't be 'silent' ... because this could be considered as a kind of intrusion ... even when that is not the intention of the application ...

kind regards
Jul 25 '08 #15
rnd me
427 Expert 256MB
if your already in java, use its file classes, no need for javascript.

in javascript, you can load pages locally if the user "saves as" into the parent folder, and runs the page from there. this would be fairly cross-browser compatible, relying on ajax. you would only need to unify the path for IE/FF diffs.
Jul 26 '08 #16
dmjpro
2,476 2GB
if your already in java, use its file classes, no need for javascript.

in javascript, you can load pages locally if the user "saves as" into the parent folder, and runs the page from there. this would be fairly cross-browser compatible, relying on ajax. you would only need to unify the path for IE/FF diffs.
See ..... I want the File I/O on client side ....... :-)
Jul 27 '08 #17

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: suresh | last post by:
Hello All, Iam writing a wsdl file using the Servicedescription class.The document I get is a well formed xml document.But some how when I try to add this wsdl file as a webrefernce to another...
1
by: moonriver | last post by:
In a xml file, can we make reference to another xml file so that all contents of the latter xml file will be included into the first xml file? Had better give me an example for details.
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
1
by: spacehopper_man | last post by:
no "rename" operation in C# !!! - this has been covered in this group before, but I can't find any good answers. what I am trying to do is refresh the content in a file with minimum...
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...
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: 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: 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.