I am trying to open a URL from the grid. When the user clicks on the info button in a table, I would like to display the information from an aspx page. When I click for the first time, I am getting the information correctly. But from then onwards, I am getting the same information. When I checked the aspx page, the page_load event is fired for the first time, from next time onwards, Page load even is not fired, as if it is getting the data from cache. when I tried to debug the javascript, i am getting the same information in "data" variable in AjaxLoaded.
Here is the javascript I have
//it calls an Ajax function which updates a server side call
//and then opens the aspx page with the id in the query string.
//I debugged it and saw that it is sending different id
function showClaimInfo(claimId) {
var mData = "'id':'" + claimId + "'";
var modalUrl = 'ModalInfo.aspx?id=' + claimId;
$.ajax({
type: "POST",
url: "ClaimService.aspx/SetId",
data: "{" + mData + "}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function() {
$.fn.nyroModalManual({
bgColor: '#808080',
url: modalUrl,
width: 500,
height: 350
});
},
error: function(xhr, status, er) {
showError(xhr, status, er);
}
});
return false;
}
and here is the html code I have
<tr class="grdRow">
<td>
<a id="hrefClaimInfo" href="#" onclick="showClaimInfo('104150357961')">
<img alt="View" border="0" src="/PortalCommon/Images/Images/View-Icon.gif">
</a></td>
<td>104150357961 </td>
<td>1234567890 </td>
<td>Test User </td>
</tr>
<tr class="altRow">
<td>
<a id="hrefClaimInfo" href="#" onclick="showClaimInfo('104150370321')">
<img alt="View" border="0" src="/PortalCommon/Images/Images/View-Icon.gif">
</a></td>
<td>104150370321 </td>
<td>1234567890 </td>
<td>Test User </td>
</tr>
I am a newbie to this control. Any help or links will be greatly appreciated.
Thanks a alot
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
The contents of the modal window should be refreshed everytime. Should not show the old data.
What version of the product are you using? On what operating system?
jquery: 1.4.1
NyroModal: 1.6.2
Visual Studio: 2008
AjaxToolkit in the same page
jTempalte
Windows Vista Professional
Please provide any additional information below.
What if you change $.ajax({ type: "POST", to $.ajax({ cache: false, type: "POST",