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

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 08-20-2008, 08:53 PM   PM User | #1
brentmc79
New to the CF scene

 
Join Date: Aug 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
brentmc79 is an unknown quantity at this point
Javascript in Ajax response is only evaluated SOMETIMES

I'm working on a wiki-type application that allows users to embed RSS feed widgets into a page. Under normal circumstances, everything works properly, but if someone attempts to embed say 10 or more of these widget then things go a little hay-wire.

Here's how it works. Using lowpro, it fires off ajax requests after the page loads and evaluates the response which replaces a uniquely identified div with the contents of the feed.

For some reason, when there's a bunch of these widgets on a page, the javascript response isn't always evaluated. The weird thing is that its totally random. Sometimes all of the responses will get evaluated properly, and sometimes only maybe two of them will.

I haven't witnessed any JS errors on the page, and all of the responses seem to be fully intact. I'm somewhat inexperienced in the realm of js and ajax, so I'm quickly running out of ideas.

Can anybody think of any reason why the response might not always get evaluated?

Last edited by brentmc79; 08-21-2008 at 01:44 AM..
brentmc79 is offline   Reply With Quote
Old 08-21-2008, 01:25 AM   PM User | #2
binaryWeapon
Regular Coder

 
Join Date: Sep 2007
Location: AZ, USA
Posts: 685
Thanks: 6
Thanked 46 Times in 46 Posts
binaryWeapon is on a distinguished road
We're going to have to see some code or a link here. It could be a number of reasons. Also I suggest installing firebug; you can see all the AJAX queries and check if any of them failed or had some sort of an error.
binaryWeapon is offline   Reply With Quote
Old 08-21-2008, 01:43 AM   PM User | #3
brentmc79
New to the CF scene

 
Join Date: Aug 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
brentmc79 is an unknown quantity at this point
I figured it out. It turns out that one of the feed items contained a bit of javascript content that seemed to cause the unwanted behavior. Once I removed the feed widget for that particular RSS feed, then everything worked as expected.
brentmc79 is offline   Reply With Quote
Reply

Bookmarks

Tags
ajax, evaluate, javascript, lowpro

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 06:22 AM.


Advertisement
Log in to turn off these ads.