AJAX = JS and XML, which JS and XML?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: AJAX = JS and XML, which JS and XML?

Hybrid View

  1. #1
    Join Date
    May 2006
    Posts
    306

    AJAX = JS and XML, which JS and XML?

    Okay, so AJAX is used with Javascript and XML, but which XML?

    I mean, how do I call to get contents from some XML file from javascript?

    I'll search in google and see what I get for some help or samples or whatever it is.

  2. #2
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002
    Posts
    10,877

    Re: AJAX = JS and XML, which JS and XML?

    A little clarification...AJAX is not used with JavaScript and XML, it IS JavaScript + XML. (Asynchronous JavaScript And XML)

    W3School's AJAX section explains its implementation very well. Remember that there are two returns (responseText and responseXML). W3Schools only shows the responseText in its examples. But you can easily change that yourself to work with an XML response.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    May 2006
    Posts
    306

    Re: AJAX = JS and XML, which JS and XML?

    Thanks, and before I type this up, I tried taking a script from a website for basic AJAX, and I found out that my JS only responds to HttpRequest and not the other two that is from.

    ActiveXObject.Create("Microsoft.XmlHttp");


    Also, I found out that you can preform script actions on your local computer with
    Code:
    var op = AxtiveXObject.Create("Scripting.FileSystemObject");
    So, is there any other Active X Objects to call that are popular, I'm just going to do some script experiments and mess around (carefully).

  4. #4
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002
    Posts
    10,877

    Re: AJAX = JS and XML, which JS and XML?

    Quote Originally Posted by code?
    Also, I found out that you can preform script actions on your local computer with
    Code:
    var op = AxtiveXObject.Create("Scripting.FileSystemObject");
    Yes, I have mentioned that to you before. But you must remember that ActiveX is restricted to IE only. And even in IE the user must enable the ActiveX object in order for it to function. NEVER rely on ActiveX unless you are securely limiting users to IE only.

    Quote Originally Posted by code?
    Thanks, and before I type this up, I tried taking a script from a website for basic AJAX, and I found out that my JS only responds to HttpRequest and not the other two that is from.

    ActiveXObject.Create("Microsoft.XmlHttp");
    Once again, that is because you are using IE. Safari and Firefox use new XMLHttpRequest(), and depending on what patches and additional installs, IE can use Msxml2.XMLHTTP. ALWAYS include the whole 3 try catch statement.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center