问题描述
奥列格
相关文章。显示在我的Chrome上。我认为这就是没有显示Saving ...消息的原因。
But it seems just only Firefox working good (I mean the "Saving..." message is showed), My Chrome is not working (the "Saving..." message is NOT showed).The warning "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/." is displayed on my Chrome. I think this is the reason the "Saving..." message is NOT showed.
我认为Saving ...消息是jqgrid的一个存在特征,我们不需要自定义消息或类似的东西。 (不需要同时使用serializeRowData和beforeSaveRow)
I think "Saving..." message is an exist feature of jqgrid and we don't need to have a custom message or something like that. (don't need to use both serializeRowData and beforeSaveRow)
所以,我的问题是为什么Chrome会触发上面的警告?
So, my question is why Chrome is fire the warning above ?
非常感谢您
推荐答案
我建议您使用 ajaxRowOptions
b
I recommend you to use ajaxRowOptions
option of jqGrid to set async: true
option:
ajaxRowOptions: { async: true }
主要区别在于 saveRow
方法将不会返回正确的值( true
或 false
),但该值很少使用。只有 inlineNav
和格式化程序:actions
jqGrid 4.7.x使用返回值并隐藏/显示/启用/禁用相应的编辑按钮。如果您使用 inlineNav
或格式化程序:actions
,您只需在回调句柄中添加一些附加代码即可隐藏/显示/启用/禁用相应的编辑按钮。
The main difference will be that saveRow
method will don't return correct value (true
or false
), but the value will be seldom used. Only inlineNav
and formatter: "actions"
of jqGrid 4.7.x use the returned value and hide/show/enable/disable the corresponding editing buttons. If you use inlineNav
or formatter: "actions"
you will just need to add some additional code in your callback handles to hide/show/enable/disable the corresponding editing buttons.
顺便说一句,我正在开发,并且已经重写了 inlineNav
或格式化器的某些部分:actions
。更改编辑按钮状态的问题不存在。因此,我将在我的存储库中从 saveRow
删除今天的行 async:false
,以便它在默认情况下可以异步工作。
By the way I'm developing new free version of jqGrid and have already rewritten some parts of inlineNav
or formatter: "actions"
. The problem with changing the states of editing buttons not exist more. So I'll remove today the line async: false
from saveRow
in my repository so that it will works asynchronous by default.
这篇关于jqgrid主要的警告同步XMLHttpRequest的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!