Jump to content

Recommended Posts

Posted

Hello people,

I had the following situation:

I needed to change a mask at run time based on the index of a UniCombobox.

If index 1, mask XXX
If index 2, mask YYY.

I resolved it as follows:

UniEdit1.JSInterface.JSCode ('$ ("#' + UniEdit1.JSName + '_id-inputEl"). Inputmask ("999.999.999-99");');

I just change the mask according to the index.

 

I wanted to understand the following question:

To apply css to a Unibutton for example, I add the css class to the button, as follows:

UniButton.JSInterface.JSCall ('addCls', ['className']);

This way the CSS is applied correctly.

 

From what I've studied, this routine above is JQuery call (https://www.w3schools.com/jquery/html_addclass.asp).

The example I reported for the mask is also JQuery call (https://plugins.jquery.com/jquery.inputmask/)

I tried to call the mask routine in a similar way to the addClass routine, but without success.

UniEdit1.JSInterface.JSCall ('inputmask', '999.999.999-99');

I wanted to understand why JSCALL worked with addClass and did not work with inputmask?

I may be making trouble with everything, if anyone can clear me up I would be grateful.

How to make JQuery calls, Js I still don't understand, I'm confused, if someone has some study material and can indicate it would be good too.

thank you.

  • Like 1

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...