本文介绍了通过Javascript手动RaisePostBackEvent的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我已将Pivot Grid Control置于部分更新面板中,并异步加载控件。 如果我这样做,Pivot网格功能不起作用。(因为没有激活RaisePostBackEvent) 我想通过javascript手动触发RaisePostBackEvent。 如果我尝试通过_doPostBack事件触发RaisePostBackEvent。 多数民众赞成也没有被解雇。 我的代码: GridID是来自客户端事件的Pivot Grid Client ID.got。 function __doPostBack(eventTarget,eventArgument){ var clientUpdatePanelID = GridID.substring( 0 ,GridID.lastIndexOf( _)); while ( true ){ if (GridID.indexOf( _)== -1) break ; GridID = GridID.replace( _, $); } if (GridID == eventTarget){ $ find(clientUpdatePanelID).doPostBack(eventTarget,eventArgument ); return ; } if (!theForm.onsubmit ||(theForm.onsubmit()!= false )){ theForm .__ EVENTTARGET。 value = eventTarget; theForm .__ EVENTARGUMENT。 value = eventArgument; theForm.submit(); } } 请指导我解决此问题。解决方案 find(clientUpdatePanelID).doPostBack(eventTarget,eventArgument); return ; } if (!theForm.onsubmit ||(theForm.onsubmit()!= false )){ theForm .__ EVENTTARGET。 value = eventTarget; theForm .__ EVENTARGUMENT。 value = eventArgument; theForm.submit(); } } 请指导我解决此问题。 i have put the Pivot Grid Control in partial update panel, and load the control Asynchronously. if i do like this,the Pivot grid Functionality are not working.(Because of RaisePostBackEvent not fired) I want to fire the RaisePostBackEvent Manually through javascript. if i try to fire RaisePostBackEvent through _doPostBack Event. Thats also not Fired. My code: GridID is the Pivot Grid Client ID.got from client side event. function __doPostBack(eventTarget, eventArgument) {var clientUpdatePanelID = GridID.substring(0, GridID.lastIndexOf("_"));while (true) {if (GridID.indexOf("_") == -1)break;GridID = GridID.replace("_", "$");} if (GridID == eventTarget) {$find(clientUpdatePanelID).doPostBack(eventTarget, eventArgument);return;} if (!theForm.onsubmit || (theForm.onsubmit() != false)) {theForm.__EVENTTARGET.value = eventTarget;theForm.__EVENTARGUMENT.value = eventArgument;theForm.submit();}}Please guide me resolve this issue. 解决方案 这篇关于通过Javascript手动RaisePostBackEvent的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-17 00:48