Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Executing java script in click handler


    I want to execute javascript on a menu item click. how can I do that? Kindly advise.

    Code:
    MenuItem support = new MenuItem("Click here");
    support.addClickHandler(new com.smartgwt.client.widgets.menu.events.ClickHandler() {
    @Override public void onClick(MenuItemClickEvent menuItemClickEvent) {
    ///////////////some example Javascript to be invoked
    window.alert("test");
    } });
    Last edited by AnutharshaSelvarasa; 13 Dec 2020, 23:32.

    #2
    Hi,

    google „JSNI“, GWT related, not SmartGWT specific.

    Best regards
    Blama

    Comment


      #3
      So this cannot be done? I'm not clear with the answer. I'm trying to do this in a smartgwt click handle. Kindly advice.

      Comment


        #4
        Yes it can, with JSNI.

        Comment

        Working...
        X