I have a Java Struts2 web application which uses jQuery and ajax.
Source code for the JSPs is given below.
In welcome.jsp, there are three text-fields, one select and one field
which is loaded using ajax($.load()).
Clicking on submit button after entering data in welcome.jsp fetches success.jsp.
If we click on back button(mapped to history.back()) from success.jsp, we are back to welcome.jsp
but data in fields are not loaded properly.
All fields before the field which is loaded using ajax retain data in them,
but fields after the field which is loaded using ajax do not retain the data.
The above problem occurs in the Firefox browser, but not in Internet Explorer.
Will the jquery address plugin resolve this issue? if so, how do i go about it?
The documentation at their site didnot help me much as i am new to jQuery.
I reffered below urls.
welcome.jsp
.......................................
.................................................
Welcome$(document).ready(function(){
$('#categorySelect').change(function(){
var catValue = $(this).val();
$('#subcategorydiv').load("suburb.action#resultdiv",{category:catValue});
});
$('#subcategorydiv').load(
"suburb.action#resultdiv",
{category:"Fruits"});
});
suburbauto.jsp(loaded into subcategorydiv by suburb action)
....................................................
......................
Welcomesuccess.jsp
.......................
SuccessSubcategory: