views:

127

answers:

3

Hi,

when i test this page http://www.catalogues4u.com.au/ViewCategory.aspx?catID=119 im getting the above error. to replicate this issue visit the above page in ie7 and you will get the prompt. i did some search but couldnt find a way to resolve this issue. any help is apprecated.

THanks, Aneef

A: 

Try moving all your JavaScript to the end of the page i.e. just before the closing </body> tag to see if that helps. I think that sometimes that error is caused by some JavaScript trying to operate on an element before that element has fully loaded.

Ian Oxley
A: 

I'm getting all sorts of rendering engine errors in IE7 here, when you set a DOCTYPE it should be accurate for your markup, currently you have this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; 

However your page is not at all XHTML Strict compliant, and not really XHTML Transitional compliant either. You should pick the DOCTYPE you're after then fix the validation errors that remain, I'm not saying it has to be 100% valid to render, I'm just saying that's the wall I currently hit viewing your page, there may be another once you fix this...but that is unlikely since it works in other browsers.

Invalid HTML will give you all sorts of weird behavior, it's best to fix them if for no other reason than ruling out the invalid HTML as the cause. A browser maker is free to assume the HTML is valid, and do things based on that (using the same ID multiple times is the most common example, it's a hash table in most browsers)...if it's not valid and that screws something up, well the browser is also free to not care :)

Nick Craver
+2  A: 

This usually occurs when you try to change the DOM of an element that hasn't been completely parsed yet. For example, this code will trigger an "Operation Aborted" error because the script tries to modify the div that's still parsing:

<div id="a">
    <script>
        document.getElementById('a').appendChild(document.createElement('div'));
    </script>
</div>

To fix this potential problem, move scripts outside and after the code of the element you will be trying to work with.

Delan Azabani