Coffeehouse Thread

24 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

IE Operation Aborted?

Back to Forum: Coffeehouse
  • User profile image
    Deactivated User

    Comment removed at user's request.

  • User profile image
    DMassy

    yman wrote:
    I am developing an ajax web app. I work against FireFox and then test it against IE, normally much later.
    The app works fine in FF, all the xmlhttp requests work etc. But when I try it in IE I am just prompted with an "Operation Aborted" message half way into the initial page load. It loads about half of the page and then just fires the message.

    Any ideas of how to debug this or determine why it would flag this error?

    edit:
    This behaviour is present in IE6 and IE7... not just the betas


    Can you provide a page that will reproduce the problem? Without that it is difficult to know exactly what is causing the problem.

    Thanks
    -Dave

  • User profile image
    Deactivated User

    Comment removed at user's request.

  • User profile image
    Deactivated User

    Comment removed at user's request.

  • User profile image
    DMassy

    yman wrote:
    Well it appears that the problem is triggered by certain behaviours in relation to elements being appended to the dom.

    The following html/js will flag an operation aborted error: (tested in IE7 beta 3)
     
    <table>
       <tr>
        <td>
         <script type="text/javascript">
          var d = document.createElement('div');
          document.body.appendChild(d);
         </script>
        </td>
       </tr>
      </table

    An example of this can be found here

    The following code html/js wil not: (again in IE7 b3)

    <div>
         <script type="text/javascript">
    var d = document.createElement('div');
    document.body.appendChild(d);
    </script>
    </div>

    An example of this can be found here


    I hope there is an easy work around for this.


    Interesting. Is there any particular reason to put a Script block inside a table cell?

    Thanks
    -Dave

  • User profile image
    DMassy

    yman wrote:
    Well it appears that the problem is triggered by certain behaviours in relation to elements being appended to the dom.

    The following html/js will flag an operation aborted error: (tested in IE7 beta 3)
     
    <table>
       <tr>
        <td>
         <script type="text/javascript">
          var d = document.createElement('div');
          document.body.appendChild(d);
         </script>
        </td>
       </tr>
      </table

    An example of this can be found here

    The following code html/js wil not: (again in IE7 b3)

    <div>
         <script type="text/javascript">
    var d = document.createElement('div');
    document.body.appendChild(d);
    </script>
    </div>

    An example of this can be found here


    I hope there is an easy work around for this.


    Interesting. Is there any particular reason to put a Script block inside a table cell?

    Thanks
    -Dave

  • User profile image
    DMassy

    yman wrote:
    Well it appears that the problem is triggered by certain behaviours in relation to elements being appended to the dom.

    The following html/js will flag an operation aborted error: (tested in IE7 beta 3)
     
    <table>
       <tr>
        <td>
         <script type="text/javascript">
          var d = document.createElement('div');
          document.body.appendChild(d);
         </script>
        </td>
       </tr>
      </table

    An example of this can be found here

    The following code html/js wil not: (again in IE7 b3)

    <div>
         <script type="text/javascript">
    var d = document.createElement('div');
    document.body.appendChild(d);
    </script>
    </div>

    An example of this can be found here


    I hope there is an easy work around for this.


    Interesting. Is there any particular reason to put a Script block inside a table cell?

    Thanks
    -Dave

  • User profile image
    Deactivated User

    Comment removed at user's request.

  • User profile image
    Deactivated User

    Comment removed at user's request.

  • User profile image
    DMassy

    yman wrote:
    DMassy, do you have any ideas on how to control this problem?


    Can you put your script blocks in the head of the page not in the middle of a TD element?

  • User profile image
    Deactivated User

    Comment removed at user's request.

  • User profile image
    DMassy

    yman wrote:
    As I mentioned 3 posts up, I dont personally do that. I used that as an example (I found the example via googling) because I couldn't post my own code, yet.


    Sorry. It is not clear from your post what you can control and what sort of workaround you are looking for.

    The issue appears to be that you are trying to append a child to the end of the body before we have completed parsing that element. That causes things to get a little confused. One possibility is to put defer='true' on script elements so they run after the body has been parsed and the element tree built.
    If you can avoid trying to append something to something that is not yet built then it shoudl solve the issue.

    Thanks
    -Dave

  • User profile image
    Deactivated User

    Comment removed at user's request.

  • User profile image
    dphiffer

    The way Google used to suggest you use their map API leads very easily to putting snippets of JavaScript into the markup tree. (They seem to have updated their code examples.) That's how I got to this thread.

  • User profile image
    dphiffer

    yman wrote:
    
    I suppose it is partly my fault for developing against FF


    It's probably a good idea to test with multiple browsers all along the development cycle. But to say it's partly *your fault* would be to underplay the gross mishandling of the IE project on the part of Microsoft.

  • User profile image
    PaoloM

    dphiffer wrote:
    But to say it's partly *your fault* would be to underplay the gross mishandling of the IE project on the part of Microsoft.

    According to the XHTML 1.0 Transitional DTD, <script> elements are allowed only inside the <head> element.

    <!ENTITY % head.misc "(script|style|meta|link|object|isindex)*">

    Both FireFox and IE allow for some latitude with malformed markup and, given that's not a part of the official spec, any implementor can do whatever they want with it.

    So FireFox is "grossly mishandling" this feature as much as IE is doing it.

  • User profile image
    Deactivated User

    Comment removed at user's request.

  • User profile image
    patrick82

    Hi all!

    But what is with the ASP.Net engine? When you register any script in the Page it will be written into the body element (inside the form).

    From this view, you will never be able to make a valid page with ASP.Net.

    Does anyone have suggestions for this one? Expressionless

    Patrick

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.