Manage Learn to apply best practices and optimize your operations.

A trick for closing JavaScript windows

This tip describes a procedure for closing JavaScript windows.

Every so often I'm forced to use pop windows in domino. They're really easy to create, but not so easy to kill after you submit data to them... Yea JavaScript can be used but the onSubmit and onload/unload functions have their limits. Especially if you're trying to save the data submitted and kill the window. So here's my dirty little trick...

First create a form, call it what you will. I typically call it 'Goaway'.

In my world the form is blank save for the following line entered in the HTML Body Attribute of the form:

"onLoad=window.close()"

In my forms which popup, I put the following lines behind a button or hotspot depending on the design.

@Command([FileSave]);@Command([Compose];"Goaway")

When the action is triggered the document in the window gets saved and then within the same window the 'goaway' form is loaded. When that form loads it automatically closes the window.

That's it, data saved, window closed... process as usual.

Dig Deeper on JavaScript for Lotus Notes Domino

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close