Hello everyone,
First of all I would like to introduce myself, I'm tom and I spend hours developing websites.

Right, down to the serious stuff... I have made a nice little AJAX based commenting system, it shows the 5 latest posts, so, when a user posts a comment the list auto updates showing the latest 5 comments (including the new post the user just made).

Here is the problem. It works beautifully as expected in firefox, opera, safari and chrome, however, when it comes to IE... Nothing!

If I make the new comments that are refreshed a simple page that says "hi" it displays it, however, when I have the full code set which is meant to be shown when the DIV refreshes, it just disappears. This got me wondering whether IE has some sort of limit on how much it can display in a new DIV refresh? I am pretty sure its not a classic "IE caching error".

Any help or suggestions will be very appreciated.
Thanks,
Tom.

Recommended Answers

All 4 Replies

Toms ace,

IE has no such limit.

There must be something in your ajax response handler that is incompatible with IE.

If a javascript error is thrown - lucky you - track down the line number.

If it's a silent bug, then you need to run some tests.

If the response handler is not too long then post it here.

Airshow

Thanks Airshow for the response.

I turned error displaying on in IE and it just mentions the submit button on the form, the current submit button is a linked DIV rather than an actual <input type="button"> button.

As mad as it sounds could this be the case? Or is this simply another thing to look at another day?

If this is the problem, I don't see why it still loads the new DIV when I just insert a small piece of text to reload.

Thanks,
Tom.

Hey, I have managed to solve the problem...

Just to let you and everyone else know it was a simple case of one too many </div>'s.
I never knew this could be an issue that would affect the AJAX loading but there we go.

Thanks for the help,
Tom.

Tom,

Wow, I wouldn't have guessed that either. And the problem only manifest itself in IE!

For the record, Notepad++ is good for helping spot unbalanced tags (and brackets etc. in code). It automatically highlights tags and their attributes as the insertion point is moved. An extra </div> would fail to highlight and you would know something was wrong.

But well done indeed for spotting the extra </div> without assistance.

Airshow

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.