Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Creating FileSystemObject in Javascript [ Client Side ]

Posted on 2002-07-11
20
Medium Priority
?
4,609 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
19 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 150 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
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…
Suggested Courses

877 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