JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 6th, 2009, 08:04 PM
romario romario is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 268 romario User rank is Sergeant Major (2000 - 5000 Reputation Level)romario User rank is Sergeant Major (2000 - 5000 Reputation Level)romario User rank is Sergeant Major (2000 - 5000 Reputation Level)romario User rank is Sergeant Major (2000 - 5000 Reputation Level)romario User rank is Sergeant Major (2000 - 5000 Reputation Level)romario User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 2 Days 2 h 32 m 39 sec
Reputation Power: 42
Some AJAX responses result in a file not found error!

With IE a certain ajax call doesn't return results but it only happens sometimes and not always.

The server error log shows: File does not exist: /home/user/public_html/500.shtml

The following are the http headers sent. The first is an AJAX call without an error and the second is with the error. I have changed any data that would identify the website. What on earth could be wrong? they are the same ajax call.

Quote:
POST /ajax/ajax.php HTTP/1.1
x-requested-with: XMLHttpRequest
Accept-Language: en-gb
Referer: http://url
Accept: */*
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Host: www.site.com
Content-Length: 6
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: PHPSESSID=30d611c74ca8a4ff321a563d8ceff404

qid=46

HTTP/1.1 200 OK
Date: Sat, 07 Nov 2009 00:51:52 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8i DAV/2 FrontPage/5.0.2.2635 mod_bwlimited/1.4 mod_auth_passthrough/2.1
X-Powered-By: PHP/5.2.9
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Keep-Alive: timeout=2, max=15
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html





POST /ajax/ajax.php HTTP/1.1
x-requested-with: XMLHttpRequest
Accept-Language: en-gb
Referer: http://url
Accept: */*
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Host: www.site.com
Content-Length: 5
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: PHPSESSID=30d611c74ca8a4ff321a563d8ceff404

qid=3

HTTP/1.1 500 Internal Server Error
Date: Sat, 07 Nov 2009 00:51:54 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8i DAV/2 FrontPage/5.0.2.2635 mod_bwlimited/1.4 mod_auth_passthrough/2.1
Content-Length: 845
Connection: close
Content-Type: text/html; charset=iso-8859-1

Reply With Quote
  #2  
Old November 7th, 2009, 11:49 AM
s-p-n's Avatar
s-p-n s-p-n is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2009
Posts: 162 s-p-n User rank is First Lieutenant (10000 - 20000 Reputation Level)s-p-n User rank is First Lieutenant (10000 - 20000 Reputation Level)s-p-n User rank is First Lieutenant (10000 - 20000 Reputation Level)s-p-n User rank is First Lieutenant (10000 - 20000 Reputation Level)s-p-n User rank is First Lieutenant (10000 - 20000 Reputation Level)s-p-n User rank is First Lieutenant (10000 - 20000 Reputation Level)s-p-n User rank is First Lieutenant (10000 - 20000 Reputation Level)s-p-n User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 2 Days 13 h 48 m
Reputation Power: 154
Well what's the JavaScript code? Also, what's the URL with issues? Usually IE will fix silly little URL mistakes, and FireFox will not. So it's strange to me you're having this problem.

Also, what's the version of IE?
__________________
- The Wise Guy

Reply With Quote
  #3  
Old November 7th, 2009, 02:49 PM
romario romario is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 268 romario User rank is Sergeant Major (2000 - 5000 Reputation Level)romario User rank is Sergeant Major (2000 - 5000 Reputation Level)romario User rank is Sergeant Major (2000 - 5000 Reputation Level)romario User rank is Sergeant Major (2000 - 5000 Reputation Level)romario User rank is Sergeant Major (2000 - 5000 Reputation Level)romario User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 2 Days 2 h 32 m 39 sec
Reputation Power: 42
Do you think it is a url problem? The code is quite long for me to post it here but I will look into it. I was using jquery and getting that error with both IE7 and IE8 but FF was perfect. I decided to remove jquery and make my own ajax function and it "solved" the problem. But I wonder why? This was the jquery code:

Code:
$.ajax({

       type: "POST",
       url: "ajax/"+file,
       data: url,
       success: function(returneddata){
         
            setdata(container,returneddata); // puts the returned data into the container element
          
       }

     });


I used alert boxes to see what the file and url variables hold just before they are sent to that jquery function, and they seem ok, even when the error happens. The file would always be a valid file and the url would always be qid=56 (or some other number). So I don't understand what is going on

Do any of you know of any issues with the jquery ajax function?

Reply With Quote
  #4  
Old November 8th, 2009, 05:46 AM
KorRedDevil's Avatar
KorRedDevil KorRedDevil is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Aug 2005
Location: Bucharest ROMANIA
Posts: 1,839 KorRedDevil User rank is Major (30000 - 40000 Reputation Level)KorRedDevil User rank is Major (30000 - 40000 Reputation Level)KorRedDevil User rank is Major (30000 - 40000 Reputation Level)KorRedDevil User rank is Major (30000 - 40000 Reputation Level)KorRedDevil User rank is Major (30000 - 40000 Reputation Level)KorRedDevil User rank is Major (30000 - 40000 Reputation Level)KorRedDevil User rank is Major (30000 - 40000 Reputation Level)KorRedDevil User rank is Major (30000 - 40000 Reputation Level)KorRedDevil User rank is Major (30000 - 40000 Reputation Level)KorRedDevil User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 2 Weeks 6 Days 8 h 13 m 27 sec
Reputation Power: 342
Send a message via Yahoo to KorRedDevil
Quote:
Originally Posted by romario
I was using jquery and getting that error with both IE7 and IE8 but FF was perfect. I decided to remove jquery and make my own ajax function and it "solved" the problem. But I wonder why?

You have already answered to yourself. Most of the time frameworks bring troubles. It is by far a better choice to create your own codes, if you are a good coder, than to use a framework. One usually does pay for his laziness
__________________
HELP SAVE ANA

Reply With Quote
  #5  
Old November 8th, 2009, 12:19 PM
romario romario is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 268 romario User rank is Sergeant Major (2000 - 5000 Reputation Level)romario User rank is Sergeant Major (2000 - 5000 Reputation Level)romario User rank is Sergeant Major (2000 - 5000 Reputation Level)romario User rank is Sergeant Major (2000 - 5000 Reputation Level)romario User rank is Sergeant Major (2000 - 5000 Reputation Level)romario User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 2 Days 2 h 32 m 39 sec
Reputation Power: 42
The people who make these frameworks are meant to be good coders. Aren't they meant to test their code on multiple browsers?

I guess it is easier to debug your own code than a framework.

Reply With Quote
  #6  
Old November 8th, 2009, 02:51 PM
KorRedDevil's Avatar
KorRedDevil KorRedDevil is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Aug 2005
Location: Bucharest ROMANIA
Posts: 1,839 KorRedDevil User rank is Major (30000 - 40000 Reputation Level)KorRedDevil User rank is Major (30000 - 40000 Reputation Level)KorRedDevil User rank is Major (30000 - 40000 Reputation Level)KorRedDevil User rank is Major (30000 - 40000 Reputation Level)KorRedDevil User rank is Major (30000 - 40000 Reputation Level)KorRedDevil User rank is Major (30000 - 40000 Reputation Level)KorRedDevil User rank is Major (30000 - 40000 Reputation Level)KorRedDevil User rank is Major (30000 - 40000 Reputation Level)KorRedDevil User rank is Major (30000 - 40000 Reputation Level)KorRedDevil User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 2 Weeks 6 Days 8 h 13 m 27 sec
Reputation Power: 342
Send a message via Yahoo to KorRedDevil
Quote:
Originally Posted by romario
The people who make these frameworks are meant to be good coders. Aren't they meant to test their code on multiple browsers?

They are excellent coders. But they want to build un universal javascript tool. A sort of panacea. Or a miraculous javascript interface for fools. Which, obviously, woun't work for all the needs, because it is impossible to predict all the humans needs. And a fool woun't understand an interface, as long as he does not know the language itself. Simple.

If you know javascript, you can write your own codes. If you don't, a framework woun't help you too much. Simple.

See also a sharp discussion about that on:
http://forums.devshed.com/javascrip...7966.html?pp=15

Last edited by KorRedDevil : November 8th, 2009 at 03:01 PM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Some AJAX responses result in a file not found error!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek