Jump to content

How to Create Custom ClientEvents at runtime


gesulmino

Recommended Posts

Hello,
I'd like to add a custom 'focusenter' client event to TuniPanel with the following Ajax code

function focusenter(p1, p2, p3)
{
  ajaxRequest(p1,'focusenter',{});
}

If I add the custom event to design time the system works correctly.
If I try to add the custom event at runtime the system doesn't work.
In the attached document I have detailed the development steps.

Can you help me?

Thanks in advance
Best regards.

Details_for_ticket_unigui_panel.pdf

  • Upvote 1
Link to comment
Share on other sites

Okay.

23 minutes ago, gesulmino said:

If I try to add the custom event at runtime the system doesn't work.

You can use like this:

UniPanel1.JSInterface.JSAddListener('focusenter', 'function(sender, event, eOpts){ajaxRequest(sender, "focusenter", {})}');

 

Link to comment
Share on other sites

On 5/24/2022 at 11:37 AM, Sherzod said:

Okay.

You can use like this:

UniPanel1.JSInterface.JSAddListener('focusenter', 'function(sender, event, eOpts){ajaxRequest(sender, "focusenter", {})}');

 

Thanks a lot, it works.

  • Like 1
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...