• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4684
  • Last Modified:

Creating FileSystemObject in Javascript [ Client Side ]

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
Bhaskar Ganapathe
Asked:
Bhaskar Ganapathe
  • 6
  • 5
  • 5
  • +3
1 Solution
 
shujiCommented:
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
 
tejaspuraniCommented:
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
 
Bhaskar GanapatheAuthor Commented:
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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
tejaspuraniCommented:
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
 
tejaspuraniCommented:
post u r code.
T.P.
0
 
Bhaskar GanapatheAuthor Commented:
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
 
tejaspuraniCommented:
ya sure let me know what else u have used.

T.P.
0
 
tejaspuraniCommented:
waiting.....
T.P.
0
 
ahosangFinance Systems DeveloperCommented:
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
 
Bhaskar GanapatheAuthor Commented:
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
 
moduloCommented:
Still open ?

modulo

Community Support Moderator
Experts Exchange
0
 
Michel PlungjanIT ExpertCommented:
Still open it seems
0
 
Bhaskar GanapatheAuthor Commented:
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
 
Michel PlungjanIT ExpertCommented:
Please finalize this
0
 
Michel PlungjanIT ExpertCommented:
A C-Grade is not acceptable. You can ask community support to change the grade or request a Paq and refund
0
 
Bhaskar GanapatheAuthor Commented:
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
 
Michel PlungjanIT ExpertCommented:
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
 
Bhaskar GanapatheAuthor Commented:
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
 
Michel PlungjanIT ExpertCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 6
  • 5
  • 5
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now