Last post Feb 21, 2012 01:47 AM by BU XI - MSFT
Feb 18, 2012 09:28 PM|richardr|LINK
I have a web application written utilizing ASP.NET MVC. I have a page that refreshes content by updating, via AJAX, a DIV tag with the results of a partial view.
The partial view being generated contains HTML like this:
<div class="itemName" style="" onclick="ItemClicked('2882');">
Item #1 - Blue Marbles
<div class="itemName" style="" onclick="ItemClicked('2011');">
Item #2 - Ceramic Bowl
<div class="itemName" style="" onclick="ItemClicked('2092');">
Item #3 - Evening Dress
<div class="itemName" style="" onclick="ItemClicked('2816');">
Item #4 - Fan
After the partial view has been updated a number of times, the click events stop working. The click events for other items on the page continues to work. And once the click events in the partial view stops working, even update the DIV tag with new content
doesn't clear the problem.
Does anyone have any explanation of what might be happening? Or of any possible solutions? Or even any suggestions of which I might search for?
Feb 21, 2012 01:47 AM|BU XI - MSFT|LINK
You may narrow down this issue by splitting the ajax part. See if it is AJAX issue, or from other part of your code logic. If it's ajax, then try tools for example
F12 in chrome -> net panel, to watch ajax requests and responses see if it is a server error or other problems that prevents response to come back.