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 2125 acoder 16,027
Recognized Expert Moderator MVP
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.
acoder 16,027
Recognized Expert Moderator MVP
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 of a text
box. This calendar never loads in my page but if I call the page by
itself in a new window javascript works fine, any ideas? See Below
when you call index and click the button the page does not show the
alert, when you call getcall...
|
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 the data is refreshed,
however if you try to refresh the report the onreadystatechage does
not seem to fire. I have tested this by placing an alert in the
verifyID2 & verifyID3 function to track where the XMLHttpRequest
currently is. Now when...
|
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 client from
the JavaScript HttpXMLRequest
protected void Page_Load(object sender, EventArgs e)
{
string txt = "";
string input = null;
|
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' 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....
|
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 info. I have the response being sent back in a comma delimited format. Is there a better way to pass the data back?
<cfquery name="employeeExists" datasource="Performance_Eval" dbtype="ODBC">
select...
| |
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 valid, it will always
appear as null. I am just returning some basic XML like:
<?xml version='1.0' encoding='UTF-8'?>
<XMLData>
|
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 Firefox, and thumbnails appear based on what you clicked on.
Do the same in IE6, and it returns an error:
Line: 71
Char: 9
Error: Unknown runtime error
|
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 content from the database
via AJAX is no problem, that works and thickbox works too, I'm just
having problems getting them both running together! It seems like it's
too much information to cram into one poor little "a href=".... the
"onclick"...
|
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 usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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: 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.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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: 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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |