Save and Close button?

  • 1
  • 1
  • Question
  • Updated 3 years ago
  • Answered

Is there a simple way to code a button to save and then close the tab?

Use case is that I have a URL formula button that is set to 

Open Target in New Window

It allows me to edit the [Related Contact] on the fly while entering a different record. Since I am popping open a new window, once I have saved I would like that window to disappear.

Photo of QuickBaseCoach App Dev./Training (Mark Shnier)

Posted 3 years ago

  • 1
  • 1
Photo of QuickBasePros_IDS

QuickBasePros_IDS, Champion

  • 4,516 Points 4k badge 2x thumb
I haven't found a solution to this either.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,204 Points 20k badge 2x thumb
I think this can be done with script. A script can only close a window which was opened by that same script (it is a security issue). So you have to write a script in the originating page that opens a second window and then continuously polls (say every 100ms) that second window for its location. If the location of the second window changes you can assume the form in the second page was submitted (or was cancelled or navigated away from) and the polling script can close the window it opened. I have never done this but if I get a chance I will create an example.
OK, thx for responding.  Since this is not going to be stupid simple, I will pass.  It's not worth a script. The user will just need to close the window manually.