This topic is locked

How to close a popup NOT created by Runner.displayPopup()

12/21/2023 3:08:45 PM
ASPRunner.NET Tips and tricks
S
Simon Ward author

I have a list which has the edit screen load in a popup using the system generated button.
I want to add a custom "save & mark as closed" button what will update a isClosed field value before saving and then close the popup (I do not need it to refresh the list).
I have looked through the examples but they all seem to relate to Runner.displayPopup() as the creation method not the default popup.
I have tried following Example#9 without the create popup side of things, but alas it still doesn't close the popup.

Hoping someone will be able to offer a tip/trick?

Client Before

var ctrl = Runner.getControl(pageid, 'isClosed');
ctrl.setValue("Checked");
$("#saveButton1").click();

return true;

Server/Client After

ASPRunner.Net Ent. 10.91

admin 12/22/2023

I think that you simply need to select 'Just close after updating in Popup Mode' checkbox under Pages -> Edit page settings in ASPRunner.NET.

Then you need to simulate 'Save' button click which will save the record and close the popup.

PS. That article only applies to popups that you open from your code.