Got it.. I just made a long string and then at the end set the innerHTML
value to the string.. works like a charm!

On Fri, Sep 14, 2012 at 2:15 PM, Greg Morphis <[email protected]> wrote:

> 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>&nbsp;&nbsp;('
>    + presentation.DATA[i][presentation.COLUMNS.findIdx('AUTHOR')]
>    + ')&nbsp;&nbsp;<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>
> &nbsp;&nbsp;(foo 2, foo 45)&nbsp;&nbsp;
> <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>
> &nbsp;&nbsp;(foo 1)&nbsp;&nbsp;
> <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:352622
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to