how the response from ajax in jsp page get refresh when two dropdown fetch from database dependent

How the response from ajax get refresh in jsp page when selecting country dropdown related state dropdown updated value cann't see in dropdown the old value is display and when eclipse is restarted the logic is work for first time and second time again same thing happen

In my jsp code two dropdown depend first is country and second is state when country select related to state is display but when the state assign a flag in database is updated to true next time
visit same jsp page country dropdown select the state dropdown flag is assign to state which is display but actually real thing is that the flag set value of state is not display in state dropdown
The ajax response is not refresh the dropdown i am using one country.jsp and one servlet state.java file is follow :
<script>
var xmlHttp;
var xmlHttp;
function showState(str) {

How the response from ajax get refresh in jsp page when selecting country dropdown related state dropdown updated value cann't see in dropdown the old value is display and when eclipse is restarted the logic is work for first time and second time again same thing happen

In my jsp code two dropdown depend first is country and second is state when country select related to state is display but when the state assign a flag in database is updated to true next time
visit same jsp page country dropdown select the state dropdown flag is assign to state which is display but actually real thing is that the flag set value of state is not display in state dropdown
The ajax response is not refresh the dropdown i am using one country.jsp and one servlet state.java file is follow :
<script>
var xmlHttp;
var xmlHttp;
function showState(str) {

Hello sir please help me it's urgent My logic is work in chrome browser but not working in IE because in my script the 1st time the script is work but next time in myscript showstate function call is pass but the url to city is not pass but ajax response from previous running value from database is shown but in chrome it is work but in IE it is not work Please help me
Thank you in advance

sudarshan jadhav
Ranch Hand

Joined: May 28, 2012
Posts: 42

posted Oct 10, 2012 22:50:53

0

My problem is solve in i have use one jsp and one servlet in servlet file i am use response.setHeader("Cache-Control", "no-cache"); that code is clean a cahe in jsp page response.
In my jsp page add head tage with
<%
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate, max-age=0, proxy-revalidate, no-transform, pre-check=0, post-check=0, private");
response.setHeader("Pragma", "no-cache"); response.setDateHeader("Expires", 0);
%> this is clear the cache from jsp page.