function formatFeed(xml){
var html = "";
var thisEntry = xml.documentElement.getElementsByTagName("entry");
for (i=0; i
" + unescape(tagval(thisEntry.item(i), "content")) + "
";
}
}
return html;
}
The previous piece of code took me forever to decipher and i still have questions. From what i can tell its a loop that looks at the author you have chosen, selects them from the blog list and then displays their name and latest post.
This was throwing off any time of output i wanted on my screen and instead had to change the display function to the follwing:
function displayDetails() {
if (request.readyState == 4) {
if (request.status == 200) {
document.getElementById("content").innerHTML = request.responseXML;
}
}
}
This finally got the XML information to display unformatted on my page.
Maddox,
ReplyDeleteI felt your pain too! Your not alone, many (if not all) were there or may still be. I even had a secondary bout of the pain when my code i thought was working, ended up failing when i went back for further testing. All is good now though
I am having the same troubles still. I feel like I have gotten my code correct, but when I check it it does not work. I have spent hours trying to do the simplest of tasks and not always understanding what it is I have wrong.
ReplyDeletethe second part of the code i have above puts the xml info in the the "content" variable.
ReplyDeleteon your site you have to create a DIV tag within the body to have that data be displayed.
Maddox,
ReplyDeleteJust so you know, you are not alone ... I too have felt my frustration level rise after spending an enormous amount of time reviewing the samples provided and still not being able to get my program to run successfully. Sometimes it is helpful to search the web for more examples so you get a better understanding of what is needed. If you continue working through the examples, and achieve the end result, it will definitely make much more sense to you and give you such a good feeling that you finally accomplished your goal. Hang in there....you can do it!
Dude I wished someone told me this a few days ago. It would have made my weekend so much better.
ReplyDeleteI'm right there with you trying to make all of these things work and display as I want them to. Sometimes my eyes start bugging out from looking at the computer for hours. It seems the way to learn what works is through trial and error.
ReplyDelete