|
So, I'm doing some AJAX'y stuff at work. There are the results of a file import, that could be very large. There could also be many of these imported files listed.
Quite a lot really. My solution is to only show the results for the latest file upload when you first show the screen. All the other uploads are "collapsed", and you have to click a + sign to show the results. Some AJAX'y stuff goes off in the background and fetches the results to display. Now there are two results to display, and the results page is already HTML, so rather than messing around the XML, I thought I'd use some JSON to pass the results back. Now comes the weird part. The results come back fine, I "eval" them (naughty me) and get an object with "TestResults" and "UploadResults". Two big lumps of html. That's all working fine and dandy. Now when I go to update my various div's with the results some weirdness occurs. I'm using the innerHTML property to update the div, because it's easier and faster to update the screen that way. All it is is a simple list like
Record 1 did not import because blah blah blah<br> However, even though the html is returned complete, stuffing it into the div using innerHTML only displays the first line. Everything after that is hidden. If I then go off and do the call again, it works. Assigning the same text twice does not. I'm confused. Anybody seen anything like it. This is in IE7, the site doesn't work in FireFox (for other reasons to complex to go into here at the moment).
|