Re: SOT: returning data from ajax and displaying it..

2012-09-14 Thread Greg Morphis

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  wrote:

> I've got this code:
> myspan.innerHTML += ''
> for(i=0; imyspan.innerHTML +=
>'' + presentation.DATA[i][presentation.COLUMNS.findIdx('TITLE')]
>+ '  ('
>+ presentation.DATA[i][presentation.COLUMNS.findIdx('AUTHOR')]
>+ ')  '
>+ presentation.DATA[i][presentation.COLUMNS.findIdx('DATE')]
>+  ""
> }
> myspan.innerHTML += ''
>
> And it's not working properly.. when I look in Firebug I see:
>
> 
> Results for your search:
> 
> 
> file 3
>   (foo 2, foo 45)  
> 02-24-2012
> 
> 
> file b
>   (foo 1)  
> 02-24-2012
> 
> 
>
> the  are on the same line but they're definitely outside the for
> loop looping over the '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


SOT: returning data from ajax and displaying it..

2012-09-14 Thread Greg Morphis

I've got this code:
myspan.innerHTML += ''
for(i=0; i' + presentation.DATA[i][presentation.COLUMNS.findIdx('TITLE')]
   + '  ('
   + presentation.DATA[i][presentation.COLUMNS.findIdx('AUTHOR')]
   + ')  '
   + presentation.DATA[i][presentation.COLUMNS.findIdx('DATE')]
   +  ""
}
myspan.innerHTML += ''

And it's not working properly.. when I look in Firebug I see:


Results for your search:


file 3
  (foo 2, foo 45)  
02-24-2012


file b
  (foo 1)  
02-24-2012



the  are on the same line but they're definitely outside the for
loop looping over the '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