Hello all, i have the following javascript program:
Code:
xmlDoc = document.implementation.createDocument("","",null);
Code:
xmlDoc.async=false;
xmlDoc.load("homepage_moz.xml");
document.write('<p class="headline">')
document.write(xmlDoc.getElementsByTagName("heading")[0].childNodes[0].nodeValue)
document.write('</p>')
document.write('<p class="centertext">'+xmlDoc.getElementsByTagName("paragraph")[0].childNodes[0].nodeValue+'</p>'+'<a href="#ils">'+xmlDoc.getElementsByTagName("link")[0].childNodes[0].nodeValue+'</a>')
document.write('<p class="centertext">'+xmlDoc.getElementsByTagName("paragraph")[1].childNodes[0].nodeValue+'</p>')
document.write('<a href="#manuals">'+xmlDoc.getElementsByTagName("link")[1].childNodes[0].nodeValue+'</a>')
document.write('<p class="centertext">'+xmlDoc.getElementsByTagName("paragraph")[3].childNodes[0].nodeValue+'</p>')
document.write('<a href ="#transit"> '+xmlDoc.getElementsByTagName("link")[2].childNodes[0].nodeValue+'</a>')
document.write('<p class="centertext">'+xmlDoc.getElementsByTagName("paragraph")[5].childNodes[0].nodeValue+'</p>')
document.write('<a href="#contact"> '+xmlDoc.getElementsByTagName("link")[3].childNodes[0].nodeValue+'</a>')
document.write('<p class="borderline"></p>')
All this does is writes from a xml document to a xml document when when I do this (In Mozilla) all the links are aligned to the upper right hand side of the screen and all the entries are on seperate lines (Each being their own paragraph when using document.write should alleviate the seperate lines). Any thoughts on this? There is nothing to my knowledge in the CSS that would do this. Any help would be greatly appreciated. TIA