SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Oct 2004
    Location
    Australia
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Red face Displaying XML data in Netscape

    I hope this is the right place to ask this question so here goes:

    I'm accessing XML from my server using javascript but I can't populate preloaded HTML fields. I have tried using an XLS style sheet but with no luck.

    Code so far:
    var sPath = 'www.mysite.com.au/myXMLtext';
    xmlHttp.open("GET", sPath, false);
    xmlHttp.send(null);
    bXMLload = xmlHttp.responseText;


    In EI I load an object on the page with the XML from the javascript call and my HTML fields then bind to that object.

    additional javascript:
    bXMLLoad = document.all[oObject].loadXML(oHTTP.responseText);

    HTML binding example:
    <INPUT dataFld=PERSONAL_DATALAST_NAME dataSrc=#oXMLSAPData size=40 value="Loading Surname" name=PERSONAL_DATALAST_NAME>

    Is there anyway to load the XML into an object on a Netscape page? And once the XML has been loaded to that object how do I populate it to HTML fields?

    Thanks in advance.
    Snicket

  2. #2
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,424
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Try reading this article: http://www.sitepoint.com/article/xml-javascript-mozilla. I believe it will answer most of your questions.

  3. #3
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    IE is the only browser that does databinding like that. To do the same in Mozilla/Netscape you'd have to use more standardized DOM methods, or use innerHTML in javascript.


Bookmarks

Posting Permissions

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