open url / launchbrowser

Monkey Targets Forums/HTML5/open url / launchbrowser

Yoda(Posted 2014) [#1]
Is there a new way to achieve this now? (I mean: open an url in a new window, which doesn't work with openurl - opens in the same window). Somehow LaunchBrowser doesn't work - gives me an "Identifiyer LaunchBrowser not found" error:

LaunchBrowser("https://www.paypal.com/....blablabla,true)


therevills(Posted 2014) [#2]
The inbuilt command is OpenUrl:
http://www.monkey-x.com/docs/html/Modules_mojo.app.html#OpenUrl

Diddy has LaunchBrowser which you can pass in the Boolean parameter either it opens in a new window or not.
Monkey:
Function LaunchBrowser(address:String, openNewWindow:Bool = True)
 	Local windowName:String = "_self"
 	If openNewWindow
 		windowName = "_blank"
 	End
 	LaunchNativeBrowser(address, windowName)
 End 

Which calls the native code:
diddy.launchBrowser=function(address, windowName)
{
    window.open(address, windowName);
}