Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    httprequest and dom document creation

    hi all,
    i have created http request using newhttprequest() and the response is
    objposter.responseText
    this contains xml content like
    <districts>
    <district code =01 name=xxx>
    </districts>
    like tht

    first i was usign this in ie browser i got result usign responseXml . so the contaent wil be in xml type and
    objPoster = new ActiveXObject("MSXML2.XMLHTTP.3.0");
    i fetched using objposter.responseXml.Selectnodes("districts/district")

    but i doesnot works in mozilla and other browsers netscape.
    so i have created this

    i have read tht i have to create dom docuemnt
    objDOM = document.implementation.createDocument("","", null);
    now i want to knw how to load the xml request into the domdocuemnt and get the value stored in the nodes .
    i tried xmldoc.load but it loads only xml files.
    mine is a string
    responseXml is not workign in mozilla and other browsers.
    plz help me regardign this issue

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    ActiveX object works for IE only, for Moz you may use XML HTTP Request object.

    See also this article
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    actually for the script
    objPoster=new ActiveXObject("Msxml2.XMLHTTP.4.0"); i have used

    objPoster = new XMLHttpRequest();


    now i have got xml string thorugh this code
    objposter.responseText

    since this is a response text xml is in the form of string

    responsexml is not workign in mozila browsers

    so i want to kwn how to get the xml mode values

    the xml string is as follows
    <districts>
    <district code=001 name="xxx">
    ..
    </districts>

    i want to get the value stored in code and name nodes

    how can i get it
    objposter.responsexml.SelectNodes("distircts/district")
    is not workign in mozila browsers

    plz help me in this issue

  • #4
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    I have heard about a crossbrowser library called SARISSA which might help you in your particular attempt. Google for it.

    here's a start
    http://www.xml.com/pub/a/2005/02/23/sarissa.html
    Last edited by Kor; 03-28-2005 at 01:01 PM.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #5
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    responseXml is not workign in mozila browsers...

    Sounds like the header content of the page is most liekly not set to text/xml. I ran into that problem.

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #6
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Frankly said, I have not yet need it, so I have only pointed out an article I have seen, but no verify...so...
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

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