How do you use "Popup Editor" with a "Button" instead of a hyperlink?
(User clicks button (instead of hyperlink), system presents popup window on screen)
Hy Robert,

The best way i know, is to use javascript to clikc in an invisible link.

you create a button and add on the extend properties the next on click event:

"document.getElementById('" + lnkEdit.Id + "').click(); return false;"

lnkEdit.Id is the id of the link that launches the popup edit, this link must have the style : class = "invisible" so that the end user cant see it.

Hi Gonçalo

I might be missing something?
Hello Robert,

Were you able to solve your problem?
I had a similar issue and found the solution. All you have to do is use the Widget Library public action Widget_Click - you should call it in the Ajax Action that is associated with the button which you want to open the poup. This action will "inject in the browser queue" the javascript code that executes the click operation in the link.

The reason why your version did not work is because you have to use the JQuery + Outsystems javascript framework to trigger the events over Rich Widgets. That is why the complexity is hidded in the Widget_Click action available in RichWidgets :) .

The corrected version of your test eSpace is attached.

Hope this helps,

Best Regards,
Daniel Lourenço
Hi Daniel I found widget_click shortly after, thanks anyhow :)
Hello everyone,

I wonder if anyone know how to use Popup_Editor widget inside an Iframe, in a way that the popup window stays in a layer above the window hosting the iframe.

Best Regards,

Diogo C S Cordeiro
Hi Diogo,

Tue Popup_Editor widget is a HTML container in the screen where the popup is generated. This means that it is limited to the rendering area of that same screen.

The only workaround I can think of is putting the generation of the popup window in the window that hosts the IFRAME and communicating with it via Javascript to display the popup (of course, that means this window would also have to be OutSystems, which I do not know if it is the case).

One other solution is generating a real browser popup window (i.e. not using the Popup_Editor widget).

Best Regards,
Daniel Lourenço
Hi Daniel,

Thank you for your ideas..Probably i'll take the first one.

Best Regards,

Diogo C S Cordeiro

Hello everyone,

I write once again related to this Popup_Editor widget hoping to share a situation i had , and spent some time to find out what it was (and it does make sense and is very simple...)

I had an edit screen with two input widgets, Input1 for a Customer and Input2 for a Customer User.

Both have popup editors associated, so you may pick the customer and user from a popup list.

Like one can only choose a customer's user after choosing the customer, Input2 and the link for the popup are only enabled when Input1 has already been filled.

Now what i want to alert you is the following :

If you decide to limit the availability of that input2 link, you should also limit the appearance of the popup widget (my solution was putting it inside an If where the True condition matches the link enable property), or else you may have problems in IE7. Firefox and IE8 seem to respond well and are smart enough to deal with it, but IE7 doesn't.

Hope this is helpful to anyone, because it took a lot of time for me to discover this one...

Best Regards,

Diogo C S Cordeiro

In 5.1, you will be able to use a Popup Editor with a Button in the same way that that you use it now with a Link.
Just set the button method to Navigate, and that's it.

Best Regards,
Gustavo Guerra
"In 5.1, you will be able to use a Popup Editor with a Button in the same way that that you use it now with a Link.
Just set the button method to Navigate, and that's it."

Good idea.
Hi there,

I have an Action with several steps and I want it to end with a popup showing up some results. What is the best way to do this? So far, I didn't manage to find a "Popup_Open" method on the rich_widget.
I added an invisible link (with an associeted popup_editor) on the page where the Action takes place and, as a last step of the action, I trigger the Widget_Click on that link to open the popup. Unfortunatly, this is not working and I don't know why. The widget_click simply does not work.
Hi Nuno,
Instead of add an invisible link, you need to add an invisible container and in the inside of the container you can put a link (visible) with an associated popup_editor, I've tested and works.
Nelson Baptista
Nelson, thanks for your reply.

Still not being able to get it to work. Did you manage to trigger the onclick event from a Widget_Click inside a Screen Action?
Ok, I guess I found the problem: the method of the link OnClick event was set to "Ajax" and it only works with "Navigate".

I suppose there is an incompatebility with "Ajax" method and invisible widgets. Am I right?
Hi Nuno,

Once you want to call the popup in the end of your action, I suggest you to use the action available in the RichWidgets called 'Widget_Click' set the id of the link to the popup you want to open, that link has to be hidden, so, to hide it, my suggestion is to add a container at the end of your web screen with the link inside, create a css like this "div.hide {display:none}" and apply it to the conteiner on the 'style' parameter, delete the 'display' parameter (set it blank, neither true nor false), and that's it!

And yes, you are correct about "the method of the link OnClick event was set to "Ajax" and it only works with "Navigate"." ;)

hope it helped you.
Best regards,
João Martins