You need to be logged in to post in the forums. If you do not have an account, please sign up first.
Table cell innerHTML does not refresh
Does not refresh table cell innerHTML.Detailed description:
There is AJAX shop cart, by click on "Add to shop cart" it caused AJAX-request, by finishing of which
refreshing UI (if item is new - adding new string into table, else incrementing existing item quantity).
Let cell - is object-cell of shop cart table, than refreshing of quantity of items caused by this code:
var oldItemsCount = cell.innerHTML / 1; // artificially devide by 1 to get number (not string)
oldItemsCount++; // increment quantity of given item
cell.innerHTML = oldItemsCount; // refresh cell innerHTML
The problem is visual refreshing of items quantity by this manner caused ONLY after
events like window scrolling or application focus changing. I checked validity of this code
in others popular browsers, namely, in IE (6, 7, 8), Mozilla Firefox, Safari, Google Chrome -
EVERYWHERE visual refreshing caused NOT depending on window scrolling or focus changing, immediately after
"Add to cart" button click. Only in Opera I see such strange effect. I tried to generate random string and replace
innerHTML of table cell on generated random string - in this case all works as expected.
Please, help me to solve this probles. I point one more time that this trouble is actual only for Opera, in others browsers
all works perfectly. Please, give me some solutions as soon as possible. Thanks a lot in advance !