Click here to Skip to main content
13,046,176 members (68,445 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I've got a program that loads the XML time of 1 hour from the site
I have to catch the response from the server, and at its base to launch an alert. Unfortunately the program can not add / expand. The only way that I can see is the capture.
But how to do it - I do not know.
Posted 9-Jan-13 23:30pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

        <title>JavaScript, the Definitive Guide</title>
        <author>David Flanagan</author>
        <cover src="/images/cover_defguide.jpg" />
        <blurb>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</blurb>
        <title>DOM Scripting</title>
        <publisher>Friends of Ed</publisher>
        <author>Jeremy Keith</author>
        <cover src="/images/cover_domscripting.jpg" />
        <blurb>Praesent et diam a ligula facilisis venenatis.</blurb>
        <title>DHTML Utopia: Modern Web Design using JavaScript &amp; DOM</title>
        <author>Stuart Langridge</author>
        <cover src="/images/cover_utopia.jpg" />
        <blurb>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</blurb>

function setDataXML(req)
    var books = req.responseXML.getElementsByTagName('book');
    for (var i=0;i<books.length;i++)
        var x = document.createElement('div');
        x.className = 'book';
        var y = document.createElement('h3');
        var z = document.createElement('p');
        z.className = 'moreInfo';
        z.appendChild(document.createTextNode('By ' + getNodeValue(books[i],'author') + ', ' + getNodeValue(books[i],'publisher')));
        var a = document.createElement('img');
        a.src = books[i].getElementsByTagName('cover')[0].getAttribute('src');
        var b = document.createElement('p');
function getNodeValue(obj,tag)
    return obj.getElementsByTagName(tag)[0].firstChild.nodeValue;
Radzhab 10-Jan-13 10:29am
What is it ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 13 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100