Default browser window from HTML

I am just building a simple HTML app and want to open a new window to an existing web page from the air app that opens in a default browser window rather than spawining a new air window.
I have been banging my apparently limited-capacity head against a wall for 8 hours now with no luck.
Can anyone tell me how to get this done? I am guessing it's as simple as adding a piece of code to my app xml file and a corresponding piece of code to my HTML page where I have the link?
Any help will be sincerely appreciated.
Bill

I have a similar problem:
I have built a web app for the iPhone which works splendidly in AIR, except that it's links to external sites will not open in the default browser.
Currently I have one HTML file in the AIR app: redirect.html which simply redirects to my web app.
If I set <script>window.htmlLoader.navigateInSystemBrowser = true;</script> the redirect to my web app opens in Firefox instead of AIR. If I set that on the home page (and all subpages) of my web app it's as if nothing was ever set.
I am new to AIR so I am making these assumptions:
window.htmlLoader.navigateInSystemBrowser = true; must be set on the first page loaded by the AIR app.
server-hosted pages cannot open anything in the default browser.
Is there are a way to set it up so my AIR version of the web app can simply mirror locally the code from my server, thus allowing me to access the default browser? I have tried an iframe which actually just caused the web app to load in Firefox like the redirect.
Any advice would be helpful.
Thanks.

Similar Messages

  • How to open a URL in the default browser via CC HTML Extension?

    Hi,
    I'm trying to open a link via the default browser in a HTML Extension for Photoshop CC built with Extension Builder 3.
    With the initial example the "/indext.html" it look like this:
    <li><button class="default" id="btn_PHXS" onClick="onClickButton('PHXS')" disabled="true">Run ps code</button></li>
    and I changed the code from "/ext.js" to:
    ...function onClickButton(ppid) {    var csInterface = new CSInterface();    csInterface.openURLInDefaultBrowser('http://www.adobe.com');}...
    This is what the "/lib/CSInterface-4.0.0.js" looks like:
    * Opens a page in the default system browser.
    * @param url   The URL of the page to open. Must use HTTP or HTTPS protocol.
    * @return One of these error codes:\n
    *      <ul>\n
    *          <li>NO_ERROR - 0</li>\n
    *          <li>ERR_UNKNOWN - 1</li>\n
    *          <li>ERR_INVALID_PARAMS - 2</li>\n
    *          <li>ERR_INVALID_URL - 201</li>\n
    *      </ul>\n
    CSInterface.prototype.openURLInDefaultBrowser = function(url)
        return cep.util.openURLInDefaultBrowser(url);
    Since "util" doesn't seem to be defined  I get the message:
    Uncaught TypeError: Cannot call method 'openURLInDefaultBrowser' of undefined
    Is the something missing?
    Thx,
    frankin

    Hi Franklin,
    Apologies for the delay but I have been trying to determine why this API is not been working. I have since discovered that, although this API is documented in the JS library, the behaviour has yet to be implemented into Photoshop CC. Offline I will try to determine why this API was included in the library when it was not ready but for the meantime, if you would like to open a browser, here is a workaround:
    Instead of using:
    //(new CSInterface).openURLInDefaultBrowser("http://www.adobe.com")
    // Use the createProcess API to open a browser. The following shows a workflow in Windows to open Internet Explorer.  
    var csInterface = new CSInterface();
    var rootDir = "/";
    var isWindows = window.navigator.platform.toLowerCase().indexOf("win") > -1;
    if (isWindows) {
                        rootDir = csInterface.getSystemPath(SystemPath.COMMON_FILES).substring(0, 3);
    var processPath = "/usr/bin/open";
      if (isWindows) {
        processPath = rootDir + "Windows/explorer.exe";
    var url = "http://www.adobe.com";
    window.cep.process.createProcess(processPath, url);
    Apologies for this inconvenience but we promise to keep you informed when openURLInDefaultBrowser API is fully supported.
    Kind regards,
    Lea

  • Closing browser window from an Applet?

    I've written a series of applets that perform different functions. I placed a button on each applet with the purpose to close the window in which that applet is running. However I don't even know where to start looking to find out how to make my applet close it's own browser window. I know how to open a new browser window from an applet but not vice versa.
    Can anyone help please?
    Mark.

    Right, I sort of tracked down some code that uses getMethods to allow me to invoke a Javascript command. It is not pretty and took a little bit of editing to get to work but it does the job without putting JS stuff into my HTML.
    However it is causing some problems. If I open one of my other applets it will only let me close that window and the previous applets ceases to respond at all. I think this may be because the invoke gets the JSObject which is the window and somehow having more than one applet open in different windows is causing it to get confused and is locking the first window and only responding to the second.
    I have seen a much simpler method that uses:
    import netscape.javascript.*;
    and JSObject to get the window but my compiler complains about the import. Any further suggestions or an example would be welcome as my current solution is a bit limited as you can effectively only have one window open at a time which doesn't suit my needs.
    Many thanks.
    Mark.

  • Open new browser window from Hyperlink in BIP PDF output report?

    Hello,
    Is there a way to open a new browser window from Hyperlink in PDF report?
    Thank you all in advance.
    MT

    Dear Friend,
    It is not supported for PDF Report. But below links helps you, to accombish this task in PDF report.
    [url http://oracleapps4u.blogspot.com/2011/03/open-hyperlink-in-new-browser-window.html]http://oracleapps4u.blogspot.com/2011/03/open-hyperlink-in-new-browser-window.html
    Thanks & Regards
    Ahamed Rafeeque Cherkala

  • Browser Invocation - from HTML element click

    If anyone knows how to make this happen, I would really
    appreciate any info. Adobe is trying to replicate the 'popup
    protection' that most modern browsers implement which prevents new
    browser windows from being opened when the action is not triggered
    by a user click (to prevent popup spam). However when the browser's
    implemented this feature they allowed javascript code the may be at
    the end of a cascade to open a browser window by correctly noticing
    that the event that triggered the code cascade was indeed a click.
    However it seems that Adobe's implementation requires a click
    directly on the SWF containing the embedded air.swf and therefore
    prevents any non-flash content on a web site is to successfully
    launch an air application even when triggered by an direct user
    interaction.

    Hi, Rico-
    Have you read the section of the API doc on calling an Animate composition from outside of the composition?
    http://www.adobe.com/devnet-docs/edgeanimate/api/current/index.html#differentcompositions
    -Elaine

  • How do I open a new browser window from Flash

    I wish to open a new browser window from Flash and when the new window closes to return to the location from whence I started.
    ThomasChen

    The command to open a new window would be the "_blank" part of a command to link to a web page in the code below.
    navigateToURL(new URLRequest("http://www.anothersite.com", "_blank"));
    As far as the new window closing and getting back to where you were in the original window, I don't understand where that original window might have gone to... You should be wherever you last left it.

  • Open new browser window from a JApplet

    Hi,
    I want to open a new browser window from a JApplet.My first thought was to use the Live Connect technology but it worked only with simple applets not with JApplets.Then i tried it by getting the Applet context (getAppletContext() method) but it still didn't work with JApplet...(it worked with Applet).I believe it has something to do with the applet security but i haven't yet figured it out.
    For example when i call the getAppletContext() method from a JApplet i get an java.security.AccessControlException ... .Thanks

    I must correct myself now :).
    The getAppletContext() method does work with JApplets too.Still , i have problems with the Live connection alternative.It seems that it by importing the netscape.javascript package i get the security eror that i mention above...

  • New browser window from uix

    How can I open a new browser window from an event handler in UIX?
    Thanks in advance,
    Martmn Patrici

    I just tried your suggestion. Unfortunately, it did not work. Here's the UIX code I used:
    <tableSelection>
    <singleSelection model="${bindings.MPOOrdersView1Iterator}" text="Select">
    <primaryClientAction>
    <firePartialAction targets="_uixState MplistsView11" source="MPOOrdersView10" event="select"/>
    </primaryClientAction>
    <contents>
    <submitButton formName="mlrhomeform" text="Print Lists" event="print" />
    <submitButton text="View Merge Reports" event="mergerpts" formName="mlrhomeform" targetFrame="_blank"/>
    </contents>
    </singleSelection>
    </tableSelection>
    The only difference from the original code is the addition of the targetFrame="_blank" in the submitButton.
    It had no effect. My redirected page showed up in the same browser window. This left me with an expired page when I press the Back button on the browser.
    My assumption is the response.sendRedirect() call wipes out the targetFrame setting.
    Does anyone know how the browser (Internet Explorer in this case) actually gets notified to open a new window? There's got to be something that the targetFrame="_blank" sets up to cause it.
    I know that Netscape supports a "Window-target:" header, but unfortunately IE doesn't. Is there some "standard" header that I can put in a response.addHeader() call that would tell all browsers to open a new window?
    Of course, a UIX solution would be preferrable!
    Any other ideas?

  • How can I open a new browser window from UIX?

    I need to open a new browser window from an event handler. How that can be done? HELP!
    Thanks!
    Martin Patrici

    HTML doesn't really let you do this on the server side; the client is in charge
    of creating new windows, not the server.
    If you know that clicking a certain link/button, etc. will always raise a new window,
    then you should use Javascript or "targetFrame" accordingly.
    If the decision will only be made on the server side, then you could reload the current
    window, only this time use an "onLoad" on the <body> to raise a window.

  • Closing browser window from Flash movie on CD

    I have to put a flash lesson I created on a cd for a client and while testing it I noticed that my exit button in the movie no longer seems to function.
    This is my close window function
        function closeWindow(evt:Event)
            var url:String = "javascript:window.opener=self; window.close()";
            var request:URLRequest = new URLRequest(url);
            try
                navigateToURL(request, "_self");
            catch (e:Error)
                trace("Error occurred!");
    Can anyone tell me why this wouldn't work when the movie is launched in a browser window from a CD?

    Fi it is at all possible you cannot do that with url request.
    Try using ExtrenalInterface class:
    ExternalInterface.call("javascript:...");
    It may not waork though depending on security settings and embed parameters.

  • Close a browser  window from a servlet

    I am newbie and am trying to close the browser window from my servlet without prompting as my servlet is designed to run as a batch app.
    The servlet is invoked by a scheduling agent and performs the batch function , but leaves the browser window open . I
    need help
    Thanks
    VK

    I am newbie and am trying to close the browser
    window from my servlet without prompting as my
    servlet is designed to run as a batch app.
    The servlet is invoked by a scheduling agent and
    performs the batch function , but leaves the browser
    window open .I don't see the problem with that. The users can easily close the browser if they want to. It's possible that some Javascript could be used to close the browser window but it's user-unfriendly and shouldn't normally be done.

  • Invoke a Browser Window from any screen.

    I've added my own menu after "System Help" on all screens by adding it in MENUSYST status MEN. I want to call Function Module CALL_BROWSER to start a Browser in Windows which will provide Training information for Users. I'm doing this by using 'T' type menu entries to Call a Report Transaction to call the FM but this resets the original SAP transaction (as if you'd typed /N in the OKCODE). This is possibly becuase my calling transaction is not in a new task. I can't find a suitable Exit in SMOD as an alternative.
    How can I invoke a Browser Window from any screen (that a User might use) without resetting the calling transaction?

    A

  • New Browser Window from Hyperlinks on PDF created in In Design

    I am creating PDF documents using In Design CS3.  The PDFs have hyperlinks to other PDFs as well as hyperlinks to webpages. The finalized PDF is being accessed through our website as a link on the webpage. The PDF is opening in a new browser window/tab and the hyperlinks are working great.  My problem is this: How do I get it so that the hyperlinks on the PDF open to a new browser window as well.  Currently, when I click a link, it changes the current browser window that the PDF is in.  I want to set this so that anyone, from any computer will have it so that the link opens a new window/tab.

    In Adobe Acrobat (the application, not the .pdf reader) use the Link Tool to edit the hyperlinked text object. Remove the “Open a web link” action assigned by default to handle the hyperlinked text when clicked. Assign a new action to the linked text that will open the hyperlink in a new window.
    Note: The links have to be established each time you create a PDF – they do not carry over from In Design or any other software.
    1.     Access the Link tool (Tools > Advanced Editing > Link Tool)
    2.     Right click on the hyperlinked text and select Properties
    3.     In the Link Properties dialog box click on the Actions tab
    4.     In the middle of the Actions panel in the Actions section click on the Open a web link action listed there to select it.
    5.     Click the Delete button located just below that section in the lower right corner. This removes the action from the list and the Actions section should now be empty.
    6.     In the Add an Action section right above the Actions section click on the Select Action drop down menu and select the Run a JavaScript action from the list.
    7.     Click the Add… button.
    8.     In the JavaScript Editor that opens up, click your cursor in the Create and Edit JavaScripts area, like you would in a word processor to begin typing, and type the following line:
    app.launchURL("http://www.MySampleURL.com/someFolder/somePage.html", true);
    9.     Change the hyperlink text between the quotation marks to your desired URL.
    Ex: app.launchURL("http://www.cnn.com", true);
    Caution:
    1.     The code is case sensitive so make sure you typed app.launchURL NOT app.launchurl or some other case combination.
    2.     Make sure that you have quotation marks around your hyperlink URL.
    3.     Make sure there is a semicolon at the end of the line of code you just typed.
    4.     Make sure that the quotation marks are straight up and down – not on an angle.
    10. Click OK to close the JavaScript Editor dialog box.
    11. Click OK to close the Link Properties dialog box.
    12. Save the .pdf and test your .pdf hyperlink by opening the .pdf document in a browser, click the link and check to see that it opens in a new browser window.

  • How to open a new browser window from a JSP page?

    Hi,
    I am picking up records from the database and displaying each record in a seperate text area field using the JSP code. I should be able to display the content ( available in the text area) in a seperate window if the user clicks on one icon.
    Is it possible to open a new browser window using JSP? If yes, how can I write information on the new browser window?
    Thanks in advance.

    Is it possible to open a new browser window using JSP?a JSP page is also an HTML page, this is client side stuff, you can do it with JavaScript.

  • Opening a browser window from a CHM (Win7)

    Hi All,
    I'm having a problem where a script we've had for years to open a special window (sized, no browser buttons, etc) for certain content is no longer working correctly in Windows 7.
    Here is the script:
    function OpenWindowSize(strUrl, u_width, u_height) {
    var w_width = ",width=" + u_width;
    var w_height = ",height=" + u_height;
    var strOptions = "scrollbars=yes,resizable=yes"
    strOptions += w_width;
    strOptions += w_height;
    strOptions += ";";
    var newWin = window.open(strUrl, "newWin", strOptions);
    //     newWin.document.close();
      newWin.focus();
    WinXP & Vista: a link within a CHM correctly opens a new window with only scroll bars, and resizable, with the specified dimensions (e.g. u_width=500, u_height=700)
    Win7: a link opens in a regular browser window with full menus, etc and not sized to the specified dimensions. An error also displays in the CHM file.
    CHM error message (snippet): 'newWin' is null or not an object.
    A developer managed to get the CHM error to go away by adding if (newWin != null) above the focus() line.
    He also managed to prove that the problem only exists within CHMs. When the same javascript is used in plain HTML, the window is called correctly, as per the WinXP & Vista example above.
    Does anyone know how to get my script working in Win7 so that it is sized correctly and doesn't have the menus/buttons?
    Thanks,
    Amber

    Hey All,
    I just got a message from PatricioV2, for this...I totally forgot to come back to the forum...I was so busy trying to work out the solution that now, I forget the specifics, but I did find out that there is NO WAY to customize a pop-up window from a CHM with IE 9 or 10 installed...any pop-up will have ALL the browser timings. And since I didn't want that effect, I abandoned that idea and pursued a different solution.
    However, I was able to use jQuery Colorbox...which really surprised me. But even with this, you cannot use "linked" images from the stylesheet so the controls don't show...so, you need to "style" the elements with color values (i.e. background, borders, etc.).
    Also, and very important, if your content is in an IFRAME in the CHM (which mine was), you MUST use a jQuery technique to get your colorbox to work on the PARENT window...otherwise, the colorbox effect will happen ALL INSIDE THE IFRAME...
    ...and on a side note: the code in the original post is very close to the code I was using...but all I needed to do was define the value of NULL and the script worked without any errors (which is in a post above)...but not being able to style the pop-up just ruined it for me...

Maybe you are looking for