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 09-09-2008, 08:27 AM   PM User | #1
pg300
New to the CF scene

 
Join Date: Sep 2008
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
pg300 is an unknown quantity at this point
After Abort all executions blank

I'm having a problem. I created a timeout feature using the abort() function. It timesout and aborts great. But when it comes time to reuse it, it returns blank O_O anyone ever had this problem?

If i dont abort it reusing it is not a problem. Is there something i have to do before resuing it after an abort()?

Thanks!
pg300 is offline   Reply With Quote
Old 09-09-2008, 02:36 PM   PM User | #2
A1ien51
Senior Coder

 
A1ien51's Avatar
 
Join Date: Jun 2002
Location: Between DC and Baltimore In a Cave
Posts: 2,717
Thanks: 1
Thanked 94 Times in 88 Posts
A1ien51 will become famous soon enough
Not sure what you are saying the issue is.

So you are reusing the XMLHttpRequest Objects.

Can you show us some code?

Eric
__________________
Tech Author [Ajax In Action, JavaScript: Visual Blueprint]
A1ien51 is offline   Reply With Quote
Old 09-09-2008, 11:38 PM   PM User | #3
pg300
New to the CF scene

 
Join Date: Sep 2008
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
pg300 is an unknown quantity at this point
actually i think i know the problem.
It works fine in firefox but in ie6 it causes problems on my site and other sites.
See this:
http://home.arcor.de/martin.honnen/m...adyState4.html
I cant figure out why but if you go there and set test state as 2 or 3 or 4. It says readystate changed to 1 and just sits there
Do you know what could be causing that?
Once it starts the send it just sits there. The testcase only returns succesfully aborted on 1 because it is the 1 before sending. The order of readysates is 1, 1, 2, 3, then 4 right?

Last edited by pg300; 09-09-2008 at 11:40 PM..
pg300 is offline   Reply With Quote
Old 09-10-2008, 12:06 AM   PM User | #4
pg300
New to the CF scene

 
Join Date: Sep 2008
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
pg300 is an unknown quantity at this point
oh my gosh i found the problem. it wasn't the ajax. it was this stupid preloader script. I wrote:
Code:
	if (document.images)	{

		if (npPreloadImg.src != 'http://www.neocodex.us/forum/sources/action_public/ncdx/navbutton.php?number='+(1 + parseInt(npThisPage))+'s'+npTotalPages)	{
			//alert('loading wanted pic into npPreloadImg');
			npPreloadImg.src='sources/action_public/ncdx/navbutton.php?number='+(1 + parseInt(npThisPage))+'s'+npTotalPages; 
			if (!npPreloadImg.complete)	{
				//alert('just loaded our pic into npPreloadImg and its not in cache so will setimout:'+npPreloadImg.src);
				setTimeout("np_next()",100);
				return;
			} else {
				//alert('we just loaded and its already in cache so continue:'+npPreloadImg.src);
			}
		} else  {
			if (!npPreloadImg.complete)	{
				//alert('our pic is still not loaded so will try again in 100ms:'+npPreloadImg.src);
				setTimeout("np_next()",100); 
				return;
			}
			//alert('npPreloadImg we want is loaded:'+npPreloadImg.src);	
		}
	}
Sorry guys
pg300 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 10:06 AM.


Advertisement
Log in to turn off these ads.