Page 1 of 1
EJS flag (XX) indicator use:
Posted: Thu Jul 05, 2018 4:26 am
by Jose Manuel
EJS flag (XX) indicator use:
Well we have a photo or several in a carousel, inside an HTM container.
How could I click on one of them and activate a different indicator in each photo I send to the server?
Do you have an Example?
Re: EJS flag (XX) indicator use:
Posted: Thu Jul 05, 2018 9:25 am
by Scott Klement
You would need to have a hidden Profound UI widget on your screen, such as a button, where the indicator could be sent back to the server. A button's "response" property works well for this, since it is a field that is sent back to the server. (Most properties are read-only, meaning their values are never sent back.)
You could then use pui.click() to click the button, which would turn on the indicator. Or, something like pui.set() or applyProperty(), depending on where you put the indicator, to change its value.
Re: EJS flag (XX) indicator use:
Posted: Thu Jul 05, 2018 9:50 am
by Jose Manuel
It is not possible via EJS ??
Re: EJS flag (XX) indicator use:
Posted: Thu Jul 05, 2018 10:00 am
by Scott Klement
Yes, you can call applyProperty(), pui.click() or pui.set() from EJS code. So, yes, you can do this from ejs.
You cannot, however, send a value back to the server simply by changing JavaScript variables, you have to change it in a widget (or in the response parameter to the onsubmit function, but that's more complex).
If you really don't like using widgets, you could send the response yourself rather than expecting Profound UI to send it, using an AJAX call.