wijmo:C1MenuItem OnClientClick Event

Posted by: nickreger on 10 September 2017, 3:06 am EST

    • Post Options:
    • Link

    Posted 10 September 2017, 3:06 am EST

    Can someone please show me how to pull this off for a selected menu item with also using OnItemClick=“C1Menu1_ItemClick” on the server side.

    I need to fire off a clientside script then a server side function. Not the other way around.

    Please help

  • Posted 10 September 2017, 3:06 am EST

    Hi Nick,

    As we understand, you would like to use client side as well as server side event on C1Menu item click.

    If yes, you need to handle both events in the order, they get triggered.

    You need to handle onClientSelect event first than onItemClick.

    For your reference, please see the attached sample that implements the same.

    Thanks,

    Manish Kumar Gupta

    2017/06/C1Menu_Client_Server_click1.zip

  • Posted 10 September 2017, 3:06 am EST

    Hello, when I add this to my code, the function is called on launch of my page. Can you give me a JS example of a function with an if statement of menu items?

  • Posted 10 September 2017, 3:06 am EST

    Hi Nick,

    We are sorry, the function is not called on page load at our end. However, we have attached an updated sample for client side alert with if statement. In the sample, alert will be displayed if Hardware menu is clicked.

    For your reference, please see the attached sample that implements the same.

    PS: Video is also attached with the sample that depicts the sample execution at our end with build version 4.0.20171.256.

    If the issue persists, please modify the attached sample depicting your issue and let us know the browser that you are using. So that we can debug at our end and assist you accordingly.

    Thanks,

    Manish Kumar Gupta

    2017/06/C1Menu_Client_Server_click2.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels