3

I have a very weird issue. I submit a form using jquery submit. everythign works fine on my PC in FF and in IE9. IE9 is corporate standard and all users have same version installed.

One user now has the issue that after every submit

  • form fields (textareas, select, input) are reverted to the previous value
  • when data is reloaded (AJAX) it displays the old values (even thought the submit before actually did save the update to the database correctly)

The only means to get the new values to display is to restart IE9. I cleared history (temp files) but that had no effect.

Since this works perfectly fine on my PC with IE9 what settings could affect this? Other ideas? Kind of lost here.

EDIT:

Other users have same problem, while it also works for some like it does on my pc

EDIT 2:

Just for clarification: I want the submitted values to stay in the input fields. The submit is a save and user should be able to continue to enter data and save again later.

EDIT 3:

Tried the reset... button (Resets internet explorer settings) on my PC. Nothing changed. Still works as expected. Problem is I can't easily do that on a users PC because he will lose his whole config.

4

1 回答 1

1

问题是在表单提交后,数据被重新加载以使用 AJAX 显示更改的元数据(最后更新用户和时间)。由于某种原因,GET AJAX 调用被缓存,因此返回了旧值。出于某种原因,我不知道我的电脑从未缓存过 GET 调用,因此它总是正常工作。

解决方案是禁用缓存:

$.ajax({
    "url": url,
    "type": "GET",        
    "cache": false,
    "dataType": 'json',
    //...
});
于 2013-04-18T12:03:31.083 回答