WebFile.Open In New Browser Window/Tab

How can I force the Webfile to be opened in a new Browser/Tab?

Using WebFile.Open forces to open in the same window and the session goes away.

Popup blockers could get in your way if you try to do it automatically. If you can work a user-click into the flow, set up a link with “new window” target. If you’re doing something like displaying a PDF, consider making a WebPage with a WebHTMLViewer inside. That’ll show the content in an iframe.

Maybe I misunderstand some of these things. I hear people cite pop-up blocker a lot. I build internal tools for an intranet. Several of our existing php/.NET apps launch new windows as pop-ups because that’s exactly what we want. We do not disable them. If I have a XOJO app that retrieves a list of 100 different PDFs – I don’t want to open the PDF in the same window/tab as my application. I want to (attempt) to open it in a new window. The user may need to go back to that list pronto…or open multiple PDFs concurrently and view them side by side. I have several apps that display basic “summary” information and if they click on the document they want and click “open”… a new Windows opens with the document they want to view. Seems like a very common task. We also use javascript to open these windows so we can (try) to control the width, height, resizability, scroll bars, and appearance of browser toolbars, when these windows open. The browser can be set to ignore these “requests” as is common in tabbed browsing. I wish I could set more of these parameters when my XOJO web app opens. The user doesn’t need/want to see all the browser toolbar and URL etc. We just “pop up” a minimal window with the requested document. I also cited a “chat” type application as another example. The web app shows a window with a list of people to chat with. If you click on a name and click “start chat” I need to “pop-open” a NEW chat window. A person may after all desire to chat with more than one person concurrently.

You can open a new window with

ExecuteJavaScript("window.open('http://www.xojo.com/index.php','mywindow','width=400,height=200')")

There are many more possibilities, see http://www.pageresource.com/jscript/jwinopen.htm

You beat me to it. It occurred to me that I had done something similar using the JQuery class inside a XOJO app. Because I wanted to actually launch a new page of my XOJO app, If memory serves I launched another instance of my XOJO app but used a hash tag to control the “start page” of the application. My app normally starts on the “summary” page…but if a user clicks a document…it launches another session of my app…but uses the hash tag to request the detail page and passes the document ID etc. This was a couple years ago so there may be better methods now. Thanks for the reminder. I think this will help Jay accomplish what we wants to as well.