473,573 Members | 2,814 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Ajax responses very slow.

22 New Member
Hi Friends,

I have a web application through which, the ajax is used to post the data onto the server and return the results. When i alert the xmlhttp.readyst ate sometimes it takes long time, that the process looks like freezing and sometimes its done very quickly as it is designed to.

I checked by alerting xmlhttp.readyst ate.

sometimes i get response 1,2 ,3 4 as the alert box quickly.
and sometimes i just get 1 and then nothing happens.

Has any one experienced the same.

Aug 24 '09 #1
10 7246
1,584 Recognized Expert Top Contributor
maybe problem with your PHP file. Try to send the same variables to the file through a manual call (enter it in your browser address bar), it maybe that this file never gets back.

Only thing I can think of that causes this.

Aug 24 '09 #2
Dheeraj Joshi
1,123 Recognized Expert Top Contributor
Just try to get the response from a dummy PHP file...

If the response time is same for every call.. then as dlite922 told its a problem with your PHP... Prpbably you need to fix some issues..

Dheeraj Joshi

I did not faced such problems.
Aug 25 '09 #3
22 New Member
I checked that , but if i send the variables directly to the php file as the action in the form tag, it goes out fine. I am using IE 7.0 and sometimes it works fine and sometimes does not work.
Aug 25 '09 #4
Dheeraj Joshi
1,123 Recognized Expert Top Contributor
Check it in FF(Fire Fox)... I got some problem when i used AJAX call in IE(Though not similar)...

Dheeraj Joshi
Aug 25 '09 #5
22 New Member
Hi Dheeraj,, even firefox and ie shows the same response. and there is a javascript code written that the web application cannot be used on a firefox. can you think of something else.
Aug 26 '09 #6
250 Recognized Expert Contributor
Do think that multiple requests are being fired off?

If so, that may part of the bottleneck.

If I remember correctly, IE will open only 2 connections at once.

You might also want to add a timeout in your Ajax callback function so the application is more responsive.


Post your httpRequest and callback function.
Aug 26 '09 #7
5,390 Recognized Expert Moderator Expert
that seems more to be a problem with the JavaScript-code then with the php-code. could you post the JavaScript-code that is relevant for the ajax-call?

kind regards
Aug 26 '09 #8
Dheeraj Joshi
1,123 Recognized Expert Top Contributor
Ok.... I dont know any other solution.

Just post the Java script like GITS told... It may be the culprit....

Dheeraj Joshi
Aug 26 '09 #9
22 New Member
Thank you for your reply.

I dont know to check if the multiple requests are being fired off.can you pls provide detail on it.
Aug 27 '09 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Trip | last post by:
Please if someone can help me !!! I need client and server code(principle based on AJAX) for next problem: i have 3 <select> tags on html page.(it must be NO page reload(callback) only select(controles) regeneration !!!) In the first <select> goes countries, which must be pulled from some kind of database (whichever you want). after that...
by: bobzimuta | last post by:
I'm creating a simple AJAX library. It's an object that will return an array containing the response text or xml. I'm trying to find a way to assign the response as a property of the object, but from within an inline function. Within the AJAX object: this.xmlhttp = new XMLHttpRequest(); this.response = ''; //to contain the response text...
by: petermichaux | last post by:
Hi, Is it possible for an AJAX request to be left open for multiple responses? This could avoid repetitive polling of the server. Thanks, Peter
by: Tony | last post by:
I just noticed that prototype.js is one of the files in the Ajax.NET distribution - I'm pretty concerned about this. Does anyone know if this is the same "prototype.js" that is not well-liked around here? If so, do you know if Ajax.NET can be used without prototype.js? -- "The most convoluted explanation that fits all of the made-up...
by: evgenyg | last post by:
Hello ! We have the following situation - when Ajax request is sent what's being returned by the server is usually an XML (which is used for DOM updates) but sometimes it's HTML which is a whole new page that should replace an existing one. I.e when we issue an Ajax request we don't know what will be returned and analyze the response to act...
by: Arjen | last post by:
Hi, I want to reload 2 divs at one click. Ive tried: <a href = "javascript:void(0);" onclick="show('ajaxrequest.php?action=removefield','div1');show('ajaxrequest.php?action=reloaddiv2','div2')">verwijderen</a> While both seperate actions work they dont when I put them together. Anyone know how to fix this ? My ajax.js with funcition...
by: simon | last post by:
hello, I have a server set up on my local (home) network and can not get an ajax application to run on the box. it works fine on our developement server and also works fine locally. I copied the application to the server, setup the website, installed the ajax extensions, also loaded/enabled front end extensions so i could load the site...
by: zalek | last post by:
I am writing application with Ajax in sync mode - xmlHttp.open("GET", url, false). I noticed that in FireFox handler doesn't starts. It starts when I use xmlHttp.open("GET", url,true). I need to use it in sync mode. Any ideas what can I do? Thanks, Zalek.
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.