• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Action class not executing via AJAX.

 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Greetings Ranchers,

In AJAX, I have sent a request with a url1(say url1) . It is executing the mapped Action class and retrieves some values. Now if I send another request with the same url1 it is not executing the Action class again and retriving the previous value from the cache(i.e. same values that were retrieved last time even if those values has changed now).
Can anyone please help me out on this?


Naveen
[ November 20, 2006: Message edited by: Bear Bibeault ]
 
Ranch Hand
Posts: 502
jQuery Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can you post Java Script code?
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Set no cahce headers!


xmlhttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");

Eric
 
Shyam kumar
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Attaching the Javascript code snippet as requestd by Prabhu

------------------------

function retrieveCourse() {
var ind = document.forms[0].college.selectedIndex;
var idField=document.forms[0].college.options[ind].value;
if (window.ActiveXObject) { // IE
var url="Course.do?college="+idField;
req = new ActiveXObject("Microsoft.XMLHTTP");
if (req) { req.open("GET", url, true);
req.onreadystatechange = processCourseChange; req.send(null); }
}
}
------------------------

Eric, can you please through some light on it.

Thanks,

Naveen
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is there to shed light on other than: The browser is using the cache which it does to make a web age load faster so you need to tell it not to use the cache.

Eric
 
reply
    Bookmark Topic Watch Topic
  • New Topic