Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Ajax.Updater using prototype problem in IE7

    Hi,

    I have a PHP based application using symfony, in which I use a plugin to display sortable, filterable tables. The plugin works fine in Firefox, Chrome, Safari, and for some tables also in IE7.

    In other cases IE is hanging on me. The tables are updated via Ajax using Prototype (all code generated by the plugin). I've sent correspondence to the plugin developer, but I'm trying to look into this also on my own. Here is the code for the ajax portion of the code:

    Code:
    <div id="browse_facilities"><div class="datagrid-loader" id="loader-browse_facilities">Please wait one moment</div></div><script type="text/javascript">
    //<![CDATA[
    new Ajax.Updater('browse_facilities', '/frontend_dev.php/browse_facilities', {asynchronous:true, evalScripts:true, onLoading:function(request, json){dg_hide_show('browse_facilities')}});
    //]]>
    </script></div>
    What I see happening is the "Please wait one moment" message just keeps flashing forever. Also the page has a very convoluted appearance where the header is duplicated. I can see the browser's CPU is also high and it seems to be in some sort of infinite loop.

    On a few occasions the table has rendered, and the header duplication rectifies itself. I got this to work once by navigating away from the page and then coming back. But in most cases this doesn't fix things.

    I found some posts that said there can be issues if no height is given to the div tag. I tried adding a height to the outermost div (1200 px - even more than I need). But it displayed correctly the first time and then after that it kept giving me the same problem again and again.

    Does anyone have any idea why this might be happening, and how I can go about debugging it or fixing it?

    Thanks,
    Steve

  • #2
    Regular Coder ohgod's Avatar
    Join Date
    Jun 2008
    Location
    Ohio
    Posts
    579
    Thanks
    6
    Thanked 69 Times in 69 Posts
    in the name of debugging you could throw in some more callbacks. you'd at least be able to see how far it's making it.

    http://prototypejs.org/api/ajax/options

    to look at what is being sent back and forth a little more in depth try temporarily swapping your Ajax.Updater for an Ajax.Request and viewing the transport. it would remove the Updater from the process and help isolate the problem.
    Last edited by ohgod; 06-18-2009 at 03:54 PM.

  • #3
    New to the CF scene
    Join Date
    Jun 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    [solved]

    Thanks - yeah I found a Firebug Lite plugin but it didn't really work for javascript debugging. I ended up just putting some alert statements in the code.

    I can see that what happens is the script keeps getting called in an infinite loop. I read somewhere that this can happen with IE if the Ajax call doesn't have any parameters. So I stuck in a dummy parameter and it worked.

    Steve

  • #4
    New to the CF scene
    Join Date
    Jul 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I had a similar problem.

    It turns out that in my case, the ajax response had a FORM element in it, and the destination of the updater was already inside a FORM element.

    It worked fine in firefox, but not IE.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •