I've got this code:
myspan.innerHTML += '<ul>'
for(i=0; i<presentation.DATA.length; i++) {
myspan.innerHTML +=
'<li class="grey_homepage_text"><a href="' +
presentation.DATA[i][presentation.COLUMNS.findIdx('PATH')]
+ '">' + presentation.DATA[i][presentation.COLUMNS.findIdx('TITLE')]
+ '</a> ('
+ presentation.DATA[i][presentation.COLUMNS.findIdx('AUTHOR')]
+ ') <span style="font-size:10px;color:blue;">'
+ presentation.DATA[i][presentation.COLUMNS.findIdx('DATE')]
+ "</span></li>"
}
myspan.innerHTML += '</ul>'
And it's not working properly.. when I look in Firebug I see:
<span id="output">
<h3>Results for your search:</h3>
<ul></ul>
<li class="grey_homepage_text">
<a href="path_to_file">file 3</a>
(foo 2, foo 45)
<span style="font-size:10px;color:blue;">02-24-2012</span>
</li>
<li class="grey_homepage_text">
<a href="path_to_file">file b</a>
(foo 1)
<span style="font-size:10px;color:blue;">02-24-2012</span>
</li>
</span>
the <ul></ul> are on the same line but they're definitely outside the for
loop looping over the <li>'s. Any idea how to remedy this?
Thanks!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352621
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm