If you have questions or if you want to share your opinion about Aware IM post your message on this forum
#46107 by BLOMASKY
Sun Jan 28, 2018 2:34 am
I have a requirement, where I have a query that opens as a popup. There are operations with records, and after the process is run, I need this query popup to close.

I was not smart enough to figure this out, but John T, who is much smarter than me, better looking and has a cool tie! helped me, so let me share this incase others need this functionality.

At the end of my process I added an EXEC_SCRIPT with:

'let win = AwareApp.m_curPopupWindow; win.window.close ();'

Thanks John!
#48549 by eagles9999
Fri Aug 31, 2018 1:33 pm
BLOMASKY wrote:I have a requirement, where I have a query that opens as a popup. There are operations with records, and after the process is run, I need this query popup to close.

I was not smart enough to figure this out, but John T, who is much smarter than me, better looking and has a cool tie! helped me, so let me share this incase others need this functionality.

At the end of my process I added an EXEC_SCRIPT with:

'let win = AwareApp.m_curPopupWindow; win.window.close ();'

Thanks John!


Is there an equivalent script for a form that is displayed in Default rather than a PopupWindow?
#49883 by Jaymer
Sat Dec 29, 2018 4:44 pm
Anyone know the code to close a regular form window.
(I'm NOT able to use the checkbox "Close form after save")

Using this, I get a runtime error:
"Exception running script TypeError: Cannot read property 'window' of undefined"

I would assume thats cause I don't have a popup, so it didn't find that object.

for popup: 'let win = AwareApp.m_curPopupWindow; win.window.close ();'
tried:
'let win = AwareApp; win.window.close ();' and
'let win = AwareApp.aware_app; win.window.close ();'
Error was: Cannot read property 'close' of undefined
#49891 by johntalbott
Sun Dec 30, 2018 5:18 am
Is it a modeless form? Screenshot?
#49898 by Jaymer
Sun Dec 30, 2018 11:49 pm
hi john,
just a regular form from a Create or Edit Object
Attachments
Screen Shot 2018-12-30 at 6.48.06 PM.png
Screen Shot 2018-12-30 at 6.48.06 PM.png (189.42 KiB) Viewed 3361 times
#49916 by Jaymer
Tue Jan 01, 2019 6:59 pm
Basically, I ended up doing this:
EXEC_SCRIPT 'window.close ();'

That closed my newly opened browser tab the Landing Page appeared in after the user clicks on a link from the company's main website.
(Customer wants to request data, click on a link on Company Website, Aware page opens in new Tab via URL login to a VP, Form collects data, Save button saves form and runs Process to display Thank You, then closes the new Tab.)

Looked great, until I tried it on my iPad and the tab didn't close.
Decided to DISPLAY LAYOUT xxx from VP_xxx using static HTML, that says thanks, with a button that DISPLAY URL to Company Homepage.
User can then close the tab or continue if they wish.

Who is online

Users browsing this forum: Bing [Bot] and 40 guests