Jump to content

[TUniPopupMenu] How to open the menu by Javascript


mterceno

Recommended Posts

Hi all,

 

I try to open the PopupMenu from "client side" event but the Object TUniPopupMenu doesn't contains the property JSName. So without the client name, it impossible to implement this functionality. 

 

Do you have any idea to open the menu in JS code ?

 

Best regards,

Link to comment
Share on other sites

Hi,  

 

I can now get the JSName of the PopupMenu but I must call before "UniSession.Synchronize();"

after that, I create the JS event Click :

  UniSession.Synchronize();
  UniMenuButton.ClientEvents.ExtEvents.Add( 'click=function click(sender, eOpts){debugger;'+
                                            'alert("test");' +
                                             TXPopupMenu(UniMenu).GetMenuControl.JSName+'el.show();'+
                                            '}'); 

With the Synchronize call, the Click event is never fired ! Without Synchronize, the alert("test") is fired well. Very strange....

Do you have any advices to avoid a call to UniSession.Synchronize();

 

Thank you for your help,

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...