Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-17-2009, 06:44 PM   PM User | #1
jjrules
New to the CF scene

 
Join Date: Jun 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
jjrules is an unknown quantity at this point
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
jjrules is offline   Reply With Quote
Old 06-18-2009, 03:51 PM   PM User | #2
ohgod
Regular Coder

 
ohgod's Avatar
 
Join Date: Jun 2008
Location: Ohio
Posts: 579
Thanks: 6
Thanked 69 Times in 69 Posts
ohgod is on a distinguished road
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..
ohgod is offline   Reply With Quote
Old 06-18-2009, 05:30 PM   PM User | #3
jjrules
New to the CF scene

 
Join Date: Jun 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
jjrules is an unknown quantity at this point
[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
jjrules is offline   Reply With Quote
Old 07-08-2010, 05:04 AM   PM User | #4
cmaxwellau
New to the CF scene

 
Join Date: Jul 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
cmaxwellau is an unknown quantity at this point
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.
cmaxwellau is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:32 PM.


Advertisement
Log in to turn off these ads.