Solved

Creating FileSystemObject in Javascript [ Client Side ]

Posted on 2002-07-11
20
4,518 Views
Last Modified: 2007-11-27
I want to store some XML files in the Client machine in a specified folder.

For this i want to use the FileSystemObject in the Javascript.

When i create the object, it gives
"Automation Server can't create object"

Someone help me in this.

Thanks in advance
0
Comment
Question by:Bhaskar Ganapathe
  • 6
  • 5
  • 5
  • +3
20 Comments
 

Expert Comment

by:shuji
ID: 7145984
I think the answer you are going to find is that you cannot access a client's file system (thank goodness) with Javascript - although there is a file system object for server-side Javascript, there is no such thing for client-side Javascript.



0
 
LVL 3

Accepted Solution

by:
tejaspurani earned 50 total points
ID: 7146131
IE Specific.
For netscape need activex plugin
T.P.
<html>
<head>
<title>Javascript split function</title>
<SCRIPT LANGUAGE="JavaScript">
<!--

function driveexists(){
var fso = new ActiveXObject("Scripting.FileSystemObject");
hasDriveBool = fso.DriveExists("c");
alert(hasDriveBool);
}

function fileexists(){
var fso = new ActiveXObject("Scripting.FileSystemObject");
fileBool = fso.FileExists("d:\\old.txt");
}

function folderexists(){
var fso = new ActiveXObject("Scripting.FileSystemObject");
folderBool = fso.FolderExists("d:\\old");
}
function opentextfile(){
var ForWriting = 2;
var TriStateFalse = 0;
var fso = new ActiveXObject("Scripting.FileSystemObject");
var newFile = fso.OpenTextFile("f:\\test\\js\\tips\\001122.html", ForWriting, true, TriStateFalse);
}


-->
</SCRIPT>

</head>
<body onload="driveexists()">
</body>
</html>
0
 
LVL 5

Author Comment

by:Bhaskar Ganapathe
ID: 7148241
Hi teja,

   I tried with you code. But it still gives Automation Server can't create object.

  I am using IE 5.5.

  Any other methods ?
 
  Important : This should work in client side

Thanks in advance
Bhaskar

0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 3

Expert Comment

by:tejaspurani
ID: 7148969
It works fine with IE
may be something  wrong with u r browser security.
just make it low, and execute the script u will get
an activex control popup just his yes.

Let me try to tesy on IE 5.5

T.P.
0
 
LVL 3

Expert Comment

by:tejaspurani
ID: 7155257
post u r code.
T.P.
0
 
LVL 5

Author Comment

by:Bhaskar Ganapathe
ID: 7155457
I have anyway done in the other method. Thanks for the efforts that you ppl. have taken for me.

If you are eager to know about what method i followed, let me know.

Bhaski
0
 
LVL 3

Expert Comment

by:tejaspurani
ID: 7157356
ya sure let me know what else u have used.

T.P.
0
 
LVL 3

Expert Comment

by:tejaspurani
ID: 7165125
waiting.....
T.P.
0
 
LVL 12

Expert Comment

by:ahosang
ID: 8329273
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

PAQ
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
ahosang
EE Cleanup Volunteer
0
 
LVL 5

Author Comment

by:Bhaskar Ganapathe
ID: 8331197
Hi People,

Sorry for not posting anything here, i was not able to access net for a while...
pl.s don't clean up this question, i will post my answers shortly,

bhaspup
0
 

Expert Comment

by:modulo
ID: 8395541
Still open ?

modulo

Community Support Moderator
Experts Exchange
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 8647615
Still open it seems
0
 
LVL 5

Author Comment

by:Bhaskar Ganapathe
ID: 8655232
Hi guys,

Again sorry for not posting anything here, I used browsers caching facility to first cache my XML files.

First time it takes a long but considerable time to load. But once loaded, the rest of execution time is very fast.

Anyway thanks for your help in this regards,
bhaski
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 8780442
Please finalize this
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 8787044
A C-Grade is not acceptable. You can ask community support to change the grade or request a Paq and refund
0
 
LVL 5

Author Comment

by:Bhaskar Ganapathe
ID: 8788207
If C-Grade is not acceptable, then why that grade is availbale for selection. ?
is that your request or its a rule that C-Grade should not be given ?
bhaski

0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 8789177
Not a RULE, but unfair if all you wanted was to get rid of the question.

http://www.cityofangels.com/Experts/Closing.htm#7
0
 
LVL 5

Author Comment

by:Bhaskar Ganapathe
ID: 8794629
Ok, as per ur suggestion, herewith i request the Community support to change the grade to B. Else pls delete this question. I tried and failed seaching how to delete this question.

Thanks to mplungjan for giving me some clues about the activities in EE. I am not a regular user previously but now i'm trying to keep in touch with EE.

Thanks for your support.

Bhaski
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 8794716
You cannot delete a question that has comments,  Coomunity support (link in left menu) can delete or change grades. I will post for you

Michel
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question