I have a page where I'm using ajax to retrieve some employee info when a user clicks a "Retrieve Employee Info" button.
The issue I'm having is that when the user updates the employee info, saves the data, then hits the retrieve employee info button again the data being retrieved is the original data, not the updated data. This only occurs in any IE browser, firefox works fine. In firefox everytime I hit the retrieve employee info button, the correct info is retrieved. It's almost like it's cached the response from the coldfusion page and isn't calling it again.
I am validating the data by using the alert box in the function below.
****This works fine in Firefox****** -
function displayResponse(request,func) {
-
//alert(request.readyState);
-
if (request.readyState == 4) {
-
if (request.status == 200 || request.status == 304) {
-
if (request.responseText.length>0){
-
init_employee(request.responseText,func);
-
alert(request.responseText);
-
}
-
else{
-
alert("No Employee Found!");
-
var emp_answer = confirm("Would you like to create a new employee");
-
if(emp_answer==true){
-
init_employee('invalid')
-
window.open ("employee_mgmt.cfm","mywindow",'height=350,width=725');
-
}
-
}
-
}
-
}
-
}
-
-
<cfquery name="employeeExists" datasource="Performance_Eval" dbtype="ODBC">
-
select last_name,first_name,dept,title,job_code,convert(char(10),date_of_hire,101) as 'date_of_hire'
-
from employee
-
where emp_id='#URL.emp_id#'
-
</cfquery>
-
<cfif #employeeExists.RecordCount# neq 0>
-
<cfoutput query="employeeExists">#last_name#,#first_name#,#dept#,#title#,#job_code#,#date_of_hire#</cfoutput>
-
</cfif>
-
3 2112
This is the typical IE caching problem. Make the URL unique to prevent caching, e.g. - url+"?d="+(new Date).getTime()
This is the typical IE caching problem. Make the URL unique to prevent caching, e.g. - url+"?d="+(new Date).getTime()
Cool thanks acoder, let me give this a shot. I can't stand IE, it pisses me off.
Did this work? If not, setting some headers may also solve the problem.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: whreed |
last post by:
I am using AJAX XMLhttprequest to request another page on form submit
and I am loading that page into a span tag. My issue is that I have
more js in the called page that loads a calendar on click...
|
by: Nico VanHaaster |
last post by:
Hello all,
I have run across an issue with IE 6.0+. I have a page that makes an
XMLHttpRequest to the webserver to update a report on the page. The
first time you hit the refresh report button...
|
by: JDeats |
last post by:
>From my development envrionment (i.e. a single WinXP notebook PC) I
have a basic AJAX application that is making the call to a Windows
Form page that just returns the request back to the AJAX...
|
by: wpt394 |
last post by:
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'...
|
by: dmorand |
last post by:
I'm curious as to how you all pass data back to the calling page when using AJAX. I have a button on a page which when clicked calls a coldfusion page to perform a query to retrieve some employee...
|
by: KDawg44 |
last post by:
Hi,
My responseXML is always null on my AJAX call. When I browse directly
to the PHP script I am calling, the XML file shows up just fine.
I have read that if a returned XML file is not...
|
by: burtonfigg |
last post by:
I'm testing an ajax page - this works fine in Firefox:
http://jimpix.co.uk/clients/a/ecards/defaultx.asp
Click on any of the links on the right under the 'occassions' or 'others' headings, in...
|
by: fidgen |
last post by:
Hiya,
I'm trying to get a AJAX driven update to my list of news articles, so
when users click the title of the news article, it pops up the article
content in a thickbox overlay. Retrieving...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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...
|
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...
| |