在页面中我有一个菜单按钮,点击该菜单按钮后会打开一个钻取框,有几个选项,如复制记录,新记录,保存记录等。该菜单按钮的代码和该菜单中的选项如下:
<button type="button" id="s_at_m_2" title="Activities Menu" tabindex="0" data-seq="0">Menu </button>
<ul id="s_at_m_2-menu" class="siebui-appletmenu ui-menu ui-widget ui-widget-content ui-corner-all" style="position: absolute; z-index: 50; top: -79px; left: 130.5px; display: block;" role="menu" tabindex="0" aria-activedescendant="ui-id-333">
<li data-caption="Undo Record [Ctrl+U]" class="siebui-appletmenu-item ui-menu-item" role="presentation"> <a href="javascript:void(0)" aria-disabled="true" class="ui-corner-all ui-state-disabled" id="ui-id-317" tabindex="-1" role="menuitem">Undo Record [Ctrl+U]</a>
</li>
<li data-caption="Delete Record [Ctrl+D]" class="siebui-appletmenu-item ui-menu-item" role="presentation"> <a href="javascript:void(0)" aria-disabled="true" class="ui-state-disabled ui-corner-all" id="ui-id-318" tabindex="-1" role="menuitem">Delete Record [Ctrl+D]</a>
</li>
<li data-caption="" class="siebui-appletmenu-item siebui-appletmenu-separator ui-menu-item" role="presentation"> <a href="javascript:void(0)" class="ui-state-disabled ui-corner-all" id="ui-id-319" tabindex="-1" role="menuitem"></a>
</li>
<li data-caption="New Record [Ctrl+N]" class="siebui-appletmenu-item ui-menu-item" role="presentation"> <a href="javascript:void(0)" aria-disabled="false" class="ui-corner-all" id="ui-id-320" tabindex="-1" role="menuitem">New Record [Ctrl+N]</a>
</li>
<li data-caption="Copy Record [Ctrl+B]" class="siebui-appletmenu-item ui-menu-item" role="presentation"> <a href="javascript:void(0)" aria-disabled="false" class="ui-corner-all" id="ui-id-321" tabindex="-1" role="menuitem">Copy Record [Ctrl+B]</a>
</li>
<li data-caption="Save Record [Ctrl+S]" class="siebui-appletmenu-item ui-menu-item" role="presentation"> <a href="javascript:void(0)" aria-disabled="false" class="ui-corner-all" id="ui-id-322" tabindex="-1" role="menuitem">Save Record [Ctrl+S]</a>
</li>
</ul>
现在每当我在页面加载后创建记录后第一次点击Menu-&gt; Save Record选项时,它就不会触发。但是,如果我第二次执行相同的操作,它会保存记录。现在,如果我刷新页面,那么同样的事情就会发生。我的问题是为什么它不是第一次开火?任何人都可以帮助我吗?
感谢。 我正在使用siebel open ui platform。 我使用以下代码在我的javascript中选择了Menu-&gt; Save Record选项:
$('ul.siebui-appletmenu li[data-caption="Save Record [Ctrl+S]"]').click(function(e){
var oMyApplet = theApplication().FindApplet ("Activity List Applet With Navigation");
oMyApplet.InvokeMethod('ExecuteQuery');
e.stopImmediatePropagation();
});
每当用户选择“保存记录”选项时,我需要刷新上面提到的applet。这就是为什么我添加了与apllet相关的那两行代码。它第二次工作正常,但是第一次在页面加载或刷新后它没有wotk。