Open Outsystems Popup from Javascript

Open Outsystems Popup from Javascript

  

Would anyone happen to know if there is a way to Open a pop up window that is already created within outsystems Using Javascript.


So I recently found out a way to close an outsystems pop up using javascript by using

SyntaxEditor Code Snippet

window.parent.RichWidgets_Popup_Editor_Close();

and this will close my pop up.


Im just wondering if there is a way to open an outsystems pop up from javascript.


Kind Regards,


Christopher DeFord

Hi Chris,

My suggestion would be to click on a hidden button that opens the popup.

Cheers

Thank you Henrique for a quick response,


so my use case is this.

  I am building out a biometrics screen for fingerprinting.

When the end user scans their fingerprint we are wanting to check to see if this print already exists within our database.

If the fingerprint matches then we are wanting to open a pop up with the matched individuals information.


I have to build the entire matching logic using javascript. Which is fine by all means. when i tried to use outsystems I would set the value of a textbox using javascript but my local variable that the text box was bound to was never updated with the value within outsystems.

if my local variable values would get updated then yes i could use a hidden button.


but in this case my parameters only live in javascript which is why i need to see if there is a way to open an outsystems popup window using javascript.


since you can close an outsystems pop up window there has to be away to open one as well. 


I hope this makes sense as to why i am looking for a solution within javascript.


Kind regards,


Christopher DeFord

Henrique Batista wrote:

Hi Chris,

My suggestion would be to click on a hidden button that opens the popup.

Cheers


Thank you Henrique for a quick response,


so my use case is this.

  I am building out a biometrics screen for fingerprinting.

When the end user scans their fingerprint we are wanting to check to see if this print already exists within our database.

If the fingerprint matches then we are wanting to open a pop up with the matched individuals information.


I have to build the entire matching logic using javascript. Which is fine by all means. when i tried to use outsystems I would set the value of a textbox using javascript but my local variable that the text box was bound to was never updated with the value within outsystems.

if my local variable values would get updated then yes i could use a hidden button.


but in this case my parameters only live in javascript which is why i need to see if there is a way to open an outsystems popup window using javascript.


since you can close an outsystems pop up window there has to be away to open one as well. 


I hope this makes sense as to why i am looking for a solution within javascript.


Kind regards,


Christopher DeFord

Uhm, I see.

Yes, since the link/button doesn't go to the server, the variable is not updated.

You can always modify the link of the hidden button by js, and pass the variable through URL.

Alternatively you can set an onchange on the input box, that goes to the server, that way the variable is updated on OS side.

Or open a clone of RichWidgets and see the code that's on the popupEditor webblock.

Not sure if any of the above is what you're looking for though.

Cheers