Web Analytics Made Easy -
StatCounter innerHTML and XMLHttpRequest Problems - CodingForum

Announcement

Collapse
No announcement yet.

innerHTML and XMLHttpRequest Problems

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • innerHTML and XMLHttpRequest Problems

    http://spentlemon.com/~clamothe/fsl/ is the site.

    I'm using javascript to retrieve (using XMLHttpRequest) and change (using getElementById('div_tag_where_content_goes').innerHTML=the_content ) the content of the page when someone clicks one of the navigation links.

    I have a few problems.

    -First off, in Firefox, whenever someone clicks a link, there's a quick flash of no content before the new content is inserted. It really doesn't look good at all. It needs to be smoother. That's the whole point (besides me just trying out stuff :P) of doing this. This is my main problem. I doubt there's anyway to avoid this when using innerHTML (which to my understanding is pretty much the only thing in my page that's not W3C-valid), but is there a way to avoid using innerHTML altogether? Some other way to replace the contents of a div from javascript?

    -Second off, in IE, each link is only clickable ONCE. In IE i'm using the activex XMLHttpRequest. I haven't checked weither this is because XMLHttpRequest doesn't work or if it's something to do with innerHTML (which is something i should get on!).

    Is there a alternate (W3C-ok perfered) to innerhtml?

    Thanks ALOT in advance for helpful answers
    Last edited by clamothe; Jul 30, 2005, 10:40 PM.

  • #2
    W3C Dom method

    It should not be limited, it could be the way you coded it.

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

    Comment

    Working...
    X