Open document in same tab

I would like to create/open a document in the same tab in client when a button on the current document was pressed.how to do it?

And is it possible to return to the previous one for the same tab? just like a browser working on next page or previous page.

That means always just one tab only.

Another question is how to create a document with the effect of right click a tab > “Open In New window” (Using Lotus Script)?

Thanks for any reply.

Subject: Open document in same tab

  1. @SetTargetFrame( targetframe ) or Call notesUIWorkspace.SetTargetFrame( frame$ ) shud open the document where ever u set to open.

  2. Create a document and use the following method to open yr document in a new tab.

notesUIWorkspace.EditDocument(…,newdocument)

Hope it helps.

Raj

Subject: RE: Open document in same tab

Thanks for your advice, I have tested 1)I use a frameset with only 1 frame content called “Main”, I use “Call notesUIWorkspace.SetTargetFrame(“Main”)” as suggested to test for my button, it shows “Target frame is ancestor of script object”.

SetTargetFrame seems just useful for two frame contents. When button in “Left” frame is pressed to open document on frame “Main”, it is ok but button in “Left” could not open doucment in “Left”.

For 2)

I would like to open another window but not tab(that means i can drag the new one to another screen), any suggestions? thanks