Hi, how can i click on a ultima left menu item using javascript ?
I'd like to put a button on my page which causes the click on a certain submenu item which contians menuitems
thanks
click on left menu
Forum rules
Please note that response time for technical support is within 3-5 business days.
Please note that response time for technical support is within 3-5 business days.
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Please try;
Code: Select all
<script type="text/javascript">
//<![CDATA[
function onSampleButtonClick() {
var sampleLink = $(PrimeFaces.escapeClientId('menuform:um_sample')).children('a');
sampleLink.trigger('click');
var href = sampleLink.attr('href');
if(href && href !== '#') {
window.location.href = href;
}
}
//]]>
</script>
<p:commandButton value="Sample" oncomplete="onSampleButtonClick()"></p:commandButton>
Github Profile: https://github.com/mertsincan
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
You're welcome!
Best Regards,
Best Regards,
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 9 guests