XML and javascript

Posted on 2005-04-20
Last Modified: 2010-04-07
When I try to save a
file on my machine using the Javascript inside my .aspx file. Like

var fso = new ActiveXObject("Scripting.FileSystemObject");
var a = fso.CreateTextFile("testfile222.xml", true);

It gives me error on the first line saying that: "Microsoft JScript
runtime error: Automation server can't create object".

I guess it has to do something with creation of automation objects in
Javascript while the script is running on IIS server.
Question by:praneetha
    LVL 23

    Accepted Solution

    nowadays, the security of MSIE is tighter that in most cases, the above code will no longer work unless you change the security settings.

    The error is indicating that the COM object "Scripting.FileSystemObject" could not be instantiated. This might be a result of 2 things:

    1. Security (Most Likely)
    2. Absence of the COM dll (which I doubt).
    LVL 15

    Author Comment

    Thanks again :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
    One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on could not pull conte…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now