![]() |
xml data in a columns & row not just columns
Hi,
I'm loading xml data in a table which is in a div. I want each item to load in it's own column with only 3 columns per row. I can get the data to load in it's own column but only one column per row. I can also get it to load only three items from the xml file and then goto the next line but then I can't get them to load in columns. Please help. Here is my code: Code:
function displayDOMlist(){ |
I haven't looked at this in detail but assume you need:
Code:
} else {Code:
var tblContent = ''; |
Thanks AndrewGSW,
I added 't.innerHTML += "<td>" + naam + "</td></tr><tr>";' but its still not working. I'm relatively new to javascript (and/or html), I don't understand what you mean by the following. Quote:
|
Your current code ends up with an additional opening tr tag at the end, which might be causing the whole thing to collapse into one column. My code should remove this extraneous opening tag.
I've revised it here as I assume there is already a closing table tag somewhere. Code:
var tblContent = ''; |
This is what i've in the html.
Code:
<table id="beerlist" border='1'></table> |
Quote:
Code:
<table id="beerlist" border='1'>beers</table> |
You also need to ensure the href is quoted within the HTML:
Code:
t.innerHTML+="<td width='100'><a href='"+pic+"'>"+naam+"</a></td>"; |
| All times are GMT +1. The time now is 10:57 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.