I am running a code that works just fine in Firefox, but seems to have trouble in IE. The basic idea is that a travel search process is initiated with one ajax call, and a 2nd ajax call 'updates' the page with the results that have been retrieved thus far. This 2nd call loops until the first call (the search) is complete.
Everything works fine in Firefox, but in IE, the 2nd call doesn't work until the very end when the 1st call is complete. In other words, in IE, you don't see the results being continuously updated -- you just see the final set of results at the end.
Now, the search (i.e. the first AJAX call) does use the cURL library with php, which may have something to do with it. I thought it may be the 'two simultaneous connection' thing, but why would it work in Firefox without any problem??
Here is JS I'm using... -
-
function startSearch(sess, inmonth, inday, inyear, outmonth, outday, outyear, sort, loc1, loc2, loc3, loc4, loc5, starslm, stars, minp, maxp, exp)
-
{
-
var loadingtext = '<img src=/images/loader.gif><br>Please wait while we process your search...<br>Searches may take up to a minute.';
-
document.getElementById("loading").innerHTML=loadingtext;
-
repeatSort = 1;
-
-
var url="dosearch.php";
-
url=url+"?sess="+sess;
-
url=url+"&inmonth="+inmonth;
-
url=url+"&inday="+inday;
-
url=url+"&inyear="+inyear;
-
url=url+"&outmonth="+outmonth;
-
url=url+"&outday="+outday;
-
url=url+"&outyear="+outyear;
-
url=url+"&sid="+Math.random();
-
-
searchRequest=GetXmlHttpObject();
-
searchRequest.onreadystatechange=function(){
-
searchReqChanged();
-
}
-
searchRequest.open("GET",url,true);
-
searchRequest.send(null);
-
getSorter(sess, sort, loc1, loc2, loc3, loc4, loc5, starslm, stars, minp, maxp);
-
}
-
-
function searchReqChanged(){
-
if (searchRequest.readyState==4)
-
{
-
repeatSort = 0;
-
}
-
}
-
-
-
function getSorter(sess, sort, loc1, loc2, loc3, loc4, loc5, starslm, stars, minp, maxp)
-
{
-
var sesst= escape(encodeURI(sess));
-
var url="sorter2.php";
-
url=url+"?sid="+Math.random();
-
url=url+"&sesst="+sesst+"&sort="+sort+"&loc1="+loc1+"&loc2="+loc2+ "&loc3="+loc3+"&loc4="+loc4+"&loc5="+loc5+"&starslm="+starslm+ "&stars="+stars+"&minp="+minp+"&maxp="+maxp;
-
sorterRequest=GetXmlHttpObject();
-
-
sorterRequest.onreadystatechange=function(){
-
-
sorterReqChanged(sess, sort, loc1, loc2, loc3, loc4, loc5, starslm, stars, minp, maxp);
-
}
-
-
sorterRequest.open("GET",url,true);
-
sorterRequest.send(null);
-
}
-
-
-
function sorterReqChanged(sess, sort, loc1, loc2, loc3, loc4, loc5, starslm, stars, minp, maxp){
-
if (sorterRequest.readyState==4)
-
{
-
document.getElementById("results").innerHTML=sorterRequest.responseText;
-
-
if (repeatSort != -1){
-
getSorter(sess, sort, loc1, loc2, loc3, loc4, loc5, starslm, stars, minp, maxp);
-
-
}
-
if (repeatSort == -1){
-
var finished = 'Search Complete!';
-
document.getElementById("loading").innerHTML=finished;
-
}
-
if (repeatSort == 0){
-
repeatSort = -1;
-
}
-
}
-
-
}
-
-
function GetXmlHttpObject()
-
{
-
var xmlHttp=null;
-
try
-
{
-
// Firefox, Opera 8.0+, Safari
-
xmlHttp=new XMLHttpRequest();
-
}
-
catch (e)
-
{
-
// Internet Explorer
-
try
-
{
-
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
-
}
-
catch (e)
-
{
-
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
-
}
-
}
-
return xmlHttp;
-
}
-
-
1 2078
May be IE readystate will be "complete" rather than 4 - function searchReqChanged(){
-
if (searchRequest.readyState==4 || searchRequest.readyState=="complete")
-
{
-
repeatSort = 0;
-
}
-
}
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: javainfo |
last post by:
How can i refresh IFRAME and load data through AJAX?
|
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 accordingly.
Now, the way to replace the current document with a new one used to be
easy and...
|
by: noballack |
last post by:
I've got a problem, I'm working with Ajax in a web with a form with a list of checkbox added to the form via an Ajax.Updater method. These added checkboxs are not been sended by the form if I use Firefox or Safari.
My source code is something like that:
<script type="text/javascript" src="http://www.my_web_page.com//js/prototype-1.4.0.js"></script>
<script>
function showMoreOptions( url, pars, div_id ){
if...
|
by: meltedown |
last post by:
This is supposed ot be an example:
http://www.ajaxtutorial.net/index.php/2006/11/30/simple-ajax-using-prototype-part-2/
It says :
This example is probably the simplest example you will ever find.
We are going to use the prototype feature ‘ajax.Updater’ (see part one
for more details on prototype).
|
by: geevaa |
last post by:
http://www.phpbuilder.com/columns/kassemi20050606.php3
XMLHttpRequest and AJAX for PHP programmers
James Kassemi
Introduction:
Although the concept isn't entirely new, XMLHttpRequest technology is
implemented on more sites now than ever. Compatibility is no longer an
issue (IE, Mozilla and Opera all support it), and the benefits to
using it are amazing. There are too many PHP programmers avoiding any
| |
by: =?Utf-8?B?U2hhd24gU2VzbmE=?= |
last post by:
Greetings! I was researching AJAX to provide a solution to displaying status
messages while a long process executed. I found several examples online and
was able to use their code to get a quick application working. However, when
attempting to implement the solution, the AJAX calls weren't updating the
screen like the examples were and seemed not to fire until after the long
running process had completed.
I found the only real...
|
by: shivendravikramsingh |
last post by:
hi friends, i m using a ajax function for retrieving some values from a database table,and display the values in required field,my prob is that the ajax function i m using is working f9 once,but if i change something in php file using in ajax function.it not refreshed,means its shows the previous result it not get updated.i can't understand whats the prob.this is the code i m using:
<?
include("config.inc.php");
//error_reporting(0); ...
|
by: Mark B |
last post by:
This is my first try at using AJAX. I want the calendars to be enabled if
the user checks CheckBox1. It works OK for a normal all page refresh but
once I introduced the AJAX code it stopped working. Any ideas?
<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="default-ajax.aspx.vb" Inherits="pages_verify_groups_Default"
Debug="true" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
by: RamananKalirajan |
last post by:
Hi those who were working in Ajax, will surely experienced with this problem. SOP - Single Origin Policy problem. I am doing a small work in Prototype Ajax. I did a sample work. When I am passing the URL to the Ajax call within the same directory. It is showing an exception "Access Denied". The cause for this exception is SOP. This occur only with the IE. Had anyone overcome this problem. If so means pls tell me that would be very helpful for...
|
by: javediq143 |
last post by:
Hi All,
This is my first post in this forum. I'm developing a CMS for my latest website. This CMS is also in PhP & MySQL. I'm done with the ADD section where the Admin can INSERT new records in Database but I'm stuck in the EDIT. I'm getting 2 problems over here. Below is the description:
1)The FIRST page will list all the records from the table which Admin can EDIT with CHECKBOX for each record to select. He can select one or more than one...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |