AJAX Problem - Firefox and IE6 issue

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • violinandviola@fastmail.fm

    AJAX Problem - Firefox and IE6 issue

    I have just put 4 different ajax bits on this page:
    The homepage for Jimpix Username Generators - an interesting and unique collection of username generation tools


    The ajax spits out chunks of images / news content, and users can view
    the chunks via next / prev links.

    When I first view the page in Firefox, there is a short delay while
    the content first loads in the ajax sections.

    When I first view the page in IE6, none of the ajax content appears to
    start with. It only appears if I click a 'next' link.

    Initially the body tag contained this, to fire off the 4 relevant
    functions:
    <body id="root" onload="sendReq uest(MyCurrentV ar + ',' +
    MyCurrentCat); sendPhotoReques t(MyPhotoVar);
    sendNewsRequest (MyNewsVar); sendWPRequest(M yWPVar)">

    I then got rid of that, and used this instead:

    window.onload = function()
    {
    sendRequest(MyC urrentVar + ',' + MyCurrentCat)
    sendPhotoReques t(MyPhotoVar)
    sendNewsRequest (MyNewsVar)
    sendWPRequest(M yWPVar)
    }

    But I get the same result regardless.

    Any advice much appreciated.

    Thanks

  • VK

    #2
    Re: AJAX Problem - Firefox and IE6 issue

    On Mar 12, 9:06 pm, violinandvi...@ fastmail.fm wrote:
    I have just put 4 different ajax bits on this page:http://jimpix.co.uk/default-ajax.asp
    >
    The ajax spits out chunks of images / news content, and users can view
    the chunks via next / prev links.
    >
    When I first view the page in Firefox, there is a short delay while
    the content first loads in the ajax sections.
    >
    When I first view the page in IE6, none of the ajax content appears to
    start with. It only appears if I click a 'next' link.
    >
    Initially the body tag contained this, to fire off the 4 relevant
    functions:
    <body id="root" onload="sendReq uest(MyCurrentV ar + ',' +
    MyCurrentCat); sendPhotoReques t(MyPhotoVar);
    sendNewsRequest (MyNewsVar); sendWPRequest(M yWPVar)">
    >
    I then got rid of that, and used this instead:
    >
    window.onload = function()
    {
    sendRequest(MyC urrentVar + ',' + MyCurrentCat)
    sendPhotoReques t(MyPhotoVar)
    sendNewsRequest (MyNewsVar)
    sendWPRequest(M yWPVar)
    >
    }
    >
    But I get the same result regardless.
    >
    Any advice much appreciated.
    Are these send*Request sync or async? Do not forget that the page is
    not displayed until the first execution break in onload handler. If
    onload one starts a long operation, it may take a lot of time before
    the initial blank screen will be repainted by the actual content. I am
    not saying that it is your problem but it is a very often problem for
    many current script-intensive sites. In my solution I am always using
    onload over overlay to release the context so to let the page to be
    initially drawn:

    <script type="text/javascript">

    function init() {
    // do your stuff
    }

    function releaseContextA ndInit() {
    window.setTimeo ut('init()',10) ;
    }

    window.onload = releaseContextA ndInit;
    </script>

    P.S. That excludes situations when one indeed doesn't want to display
    the page until all its content is fully prepared.

    Comment

    Working...