JavaScrip, xml and Linux

Discussion in 'Javascript' started by Jean Pion, Dec 21, 2004.

  1. Jean Pion

    Jean Pion Guest

    Dear readers,

    Can I use the following object on a Linux based web server:

    var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");

    If not, is there a compatible object?

    Tia, Jean.
    Jean Pion, Dec 21, 2004
    #1
    1. Advertising

  2. Jean Pion

    Jean Pion Guest

    Re: JavaScrip, xml

    Dear readers,

    Okay, that was a bit stupid because the object is - ofcourse - created by
    the browser...
    Now the real trouble is the following code:

    var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
    xmlDoc.async = "false";
    xmlDoc.load(http://111.222.333.444/btw/Btw2Xml.jsp?parm=NYC);

    If I have a local file, I can do the load... ( the url shown is a fake one)

    If I put very same file on my webserver, I get a an "access error" in IE on
    the 3rd line show, character 7.
    This is the 'dot' in "xmlDoc.load". If I use the script debugger it says:
    "msxml3.dll : access denied".

    Which is very informative, but not a great help.
    Does anyone have a clue?

    Tia, Jean.

    "Jean Pion" <> schreef in bericht
    news:ab1c4$41c7dd3f$513a1b62$...
    > Dear readers,
    >
    > Can I use the following object on a Linux based web server:
    >
    > var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
    >
    > If not, is there a compatible object?
    >
    > Tia, Jean.
    >
    >
    Jean Pion, Dec 21, 2004
    #2
    1. Advertising

  3. Re: JavaScrip, xml

    Jean Pion wrote:


    > Now the real trouble is the following code:
    >
    > var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
    > xmlDoc.async = "false";


    Should be
    xmlDoc.async = false;

    > xmlDoc.load(http://111.222.333.444/btw/Btw2Xml.jsp?parm=NYC);
    >
    > If I have a local file, I can do the load... ( the url shown is a fake one)
    >
    > If I put very same file on my webserver, I get a an "access error" in IE on
    > the 3rd line show, character 7.


    If you have script in a page served from http://example.com/ then using
    Microsoft.XMLDOM you can only load URLs from that host
    http://example.com/, at least with the normal security settings in IE.
    I think you can make http://example.com/ a trusted site and thereby
    allow it to connect to other servers.

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, Dec 21, 2004
    #3
  4. Jean Pion

    Jean Pion Guest

    Re: JavaScrip, xml

    Thanks Martin,

    That sounds very reasonable...
    I tried this, but I still have the same troubles.
    Even checked all the options for trusted sites, which seem to allow for
    cross-domain activities.

    Now trough yout link found that:

    Set the domain property only if you must allow cross-domain scripting. Use a
    value determined on the server. Setting this property to a value determined
    on the client (like through the location object) could expose your site to
    attack from another site through Domain Name System (DNS) manipulation.

    But I'm unsure what it means but I think it is releated.
    Any examples?

    Tia, Jean.

    "Martin Honnen" <> schreef in bericht
    news:41c80693$0$29426$-online.net...
    >
    >
    > Jean Pion wrote:
    >
    >
    > > Now the real trouble is the following code:
    > >
    > > var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
    > > xmlDoc.async = "false";

    >
    > Should be
    > xmlDoc.async = false;
    >
    > > xmlDoc.load(http://111.222.333.444/btw/Btw2Xml.jsp?parm=NYC);
    > >
    > > If I have a local file, I can do the load... ( the url shown is a fake

    one)
    > >
    > > If I put very same file on my webserver, I get a an "access error" in IE

    on
    > > the 3rd line show, character 7.

    >
    > If you have script in a page served from http://example.com/ then using
    > Microsoft.XMLDOM you can only load URLs from that host
    > http://example.com/, at least with the normal security settings in IE.
    > I think you can make http://example.com/ a trusted site and thereby
    > allow it to connect to other servers.
    >
    > --
    >
    > Martin Honnen
    > http://JavaScript.FAQTs.com/
    Jean Pion, Dec 21, 2004
    #4
  5. Jean Pion

    Jean Pion Guest

    Re: JavaScrip, xml

    Thanks Martin,

    Oh dear, oh dear. In my hury I 'trusted' the the wrong site.
    So, to follow your example:

    If you have script in a page served from http://www.example.com then using
    Microsoft.XMLDOM you can load URLs from http://www.elsewhere.com
    if you can make http://www.example.com a trusted site.

    You were right, thank you.
    I was confused and tried to 'trust' http://www.elsewhere.com but that does
    not work.

    Jean

    "Jean Pion" <> schreef in bericht
    news:c4007$41c81c44$513a1b62$...
    > Thanks Martin,
    >
    > That sounds very reasonable...
    > I tried this, but I still have the same troubles.
    > Even checked all the options for trusted sites, which seem to allow for
    > cross-domain activities.
    >
    > Now trough yout link found that:
    >
    > Set the domain property only if you must allow cross-domain scripting. Use

    a
    > value determined on the server. Setting this property to a value

    determined
    > on the client (like through the location object) could expose your site to
    > attack from another site through Domain Name System (DNS) manipulation.
    >
    > But I'm unsure what it means but I think it is releated.
    > Any examples?
    >
    > Tia, Jean.
    >
    > "Martin Honnen" <> schreef in bericht
    > news:41c80693$0$29426$-online.net...
    > >
    > >
    > > Jean Pion wrote:
    > >
    > >
    > > > Now the real trouble is the following code:
    > > >
    > > > var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
    > > > xmlDoc.async = "false";

    > >
    > > Should be
    > > xmlDoc.async = false;
    > >
    > > > xmlDoc.load(http://111.222.333.444/btw/Btw2Xml.jsp?parm=NYC);
    > > >
    > > > If I have a local file, I can do the load... ( the url shown is a fake

    > one)
    > > >
    > > > If I put very same file on my webserver, I get a an "access error" in

    IE
    > on
    > > > the 3rd line show, character 7.

    > >
    > > If you have script in a page served from http://example.com/ then using
    > > Microsoft.XMLDOM you can only load URLs from that host
    > > http://example.com/, at least with the normal security settings in IE.
    > > I think you can make http://example.com/ a trusted site and thereby
    > > allow it to connect to other servers.
    > >
    > > --
    > >
    > > Martin Honnen
    > > http://JavaScript.FAQTs.com/

    >
    >
    Jean Pion, Dec 21, 2004
    #5
  6. Jean Pion

    Mark Preston Guest

    Jean Pion wrote:
    > Dear readers,
    >
    > Can I use the following object on a Linux based web server:
    >
    > var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
    >
    > If not, is there a compatible object?
    >

    Jean,

    I see you already have a few answers, but not about the actual problem.
    As a test, can you imagine where a Linux system would get hold of either
    ActiveXObjects or Microsoft.XMLDOM?

    That's right - neither can I. Both are, after all, _Microsoft_ products
    which are in notoriously short supply on Linux systems...
    Mark Preston, Dec 24, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert Ladd

    Disable Calendar Control from javascrip

    Robert Ladd, Feb 27, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    1,266
    Robert Ladd
    Feb 27, 2005
  2. =?utf-8?B?4pmlZVh0cmVtZSBvWHlnZW7imaU=?=

    How do i call JAVASCRIP function if...

    =?utf-8?B?4pmlZVh0cmVtZSBvWHlnZW7imaU=?=, Aug 25, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    475
    =?Utf-8?B?QXVndXN0aW4gUHJhc2FubmE=?=
    Aug 25, 2006
  3. Ganesh
    Replies:
    1
    Views:
    442
    clintonG
    Aug 2, 2007
  4. deepak kumar
    Replies:
    0
    Views:
    139
    deepak kumar
    Oct 30, 2004
  5. Alex Maghen

    "ASP:" WebControls and Non-JavaScrip

    Alex Maghen, Feb 8, 2005, in forum: ASP .Net Web Controls
    Replies:
    5
    Views:
    157
    Scott M.
    Feb 9, 2005
Loading...

Share This Page