Open a pop up from JJT framework

Hi
I have a requirement to open a pop up from JTT framework
I have made one Order Details page in OA framework
In this page,when you click on one link, it opens a one popup and it works a modal window.
There are many ways to come to this page
When we come from Home page through function, it opens a Order details page,and if you click on link, pop up opens and it works as a modal window.
Another way to come to this page from Quote details page
On Quote details page, i have provided one link and if you click on this link,Order details page should open.
so i have used jtfcrmchrome.jsp&page=<path> and it opens my Order Details page
but on my order Details page when we click on a link, the pop up is not opening and it does nothing.it does not give any error.
The code to open a pop up is following.
public static void registerOpenSearchPage ( OAPageContext pageContext,OAWebBean webBean, String pageName , String imageID , String[] itemListToBeRefreshed , HashMap paramList, String refBaseFlag , String event)
String url = "/OA_HTML/cabo/jsps/frameRedirect.jsp?redirect=/OA_HTML/OA.jsp&page="+pageName+"&retainAM=Y";
String paramStr = "";
if ( paramList != null )
Set keyList = paramList.keySet();
Object[] keyArray = keyList.toArray();
for ( int i = 0 ; i < keyArray.length ; i++ )
String keyName = (String) keyArray;
String keyValue = (String) paramList.get(keyName);
paramStr = paramStr+"&"+keyName+"="+keyValue;
url = url+paramStr;
//System.out.println("inside another registerOpenSearchPage url is "+url);
OAUrl popupUrl = new OAUrl(url, OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
String strUrl = popupUrl.createURL(pageContext);
imageID = "lineQty1";
if ( imageID == null ){ imageID = "DetailsLink"; }
if ( itemListToBeRefreshed == null )
itemListToBeRefreshed = new String[4];
itemListToBeRefreshed[0] = "customLOVLineId";
itemListToBeRefreshed[1] = "customLOVDelID";
itemListToBeRefreshed[2] = "customLOVTaskID";
itemListToBeRefreshed[3] = "customLOVObjVersion";
String refBaseFun = "refreshBaseFor"+imageID;
String fun = " function openCustomLOVFor"+imageID+"() "+
" { "+
// " alert ('opening new window'); "+
" top.closewin = true; "+
//" var win = openWindow(window, '"+strUrl+"', 'lovWindow',{width:750, height:550}, true,'dialog','null'); "+
" var win = openWindow(window, '"+strUrl+"', 'lovWindow',{width:750, height:550}, true,'dialog',"+refBaseFun+"); "+
" var itemArray = new Array(); ";
String temp = "";
for ( int i = 0 ; i < itemListToBeRefreshed.length ; i++ )
temp = temp + " itemArray["+i+"]='"+ itemListToBeRefreshed[i] +"';";
fun = fun + temp;
fun = fun + " top.itemArrayList"+imageID+" = itemArray; "+
System.out.println("inside another registerOpenSearchPage before putjavascript");
StringBuffer funName = new StringBuffer("openCustomLOVFor");
funName.append(imageID);
pageContext.putJavaScriptFunction(funName.toString(), fun);
// ********* REGISTERING THE REFRESH BASE FUNCTION **********
String refBaseFn = "";
//refBaseFlag = "Yes";
if ( "Yes".equals(refBaseFlag) )
if ( event == null )
event = "GET_FOR_TABLE";
//refBaseFn = " submitForm('DefaultFormName',0,{'event':'"+event+"'} ); ";
refBaseFn = " submitForm('DefaultFormName',0,{'event':'"+event+"'} ); ";
//refBaseFn = " submitForm('DefaultFormName',0,{'lovReturn':'true','event':'"+event+"'} ); ";
String fun2 = " function "+refBaseFun+"(lovwin , event) { "+
// " alert ('refresh function'); "+
" if ( !lovwin.popupSL ){ return false; } "+
" else { "+
" var listOfEl = new Array(); "+
" listOfEl = top.itemArrayList"+imageID+" ; "+
" var result = lovwin.returnValue; "+
// " alert ( lovwin.returnValue ); "+
" for ( var i = 0 ; i < listOfEl.length ; i++ ) { "+
" id1 = document.getElementById(listOfEl[i]); "+
" id1.value = result[i]; "+
" } "+
" top.closewin = false ; "+
refBaseFn+
" }"+
//System.out.println("before javascriptfunction refBaseFun");
pageContext.putJavaScriptFunction(refBaseFun, fun2);
//System.out.println("after javascriptfunction refBaseFun");
OABodyBean bodyBean = (OABodyBean)pageContext.getRootWebBean();
//System.out.println("before onload javascriptfunction");
bodyBean.setOnLoad("javascript: "+funName.toString()+"()");
//System.out.println("after onload javascriptfunction");
Could anyboy throw some points on this?
Regards
Hitesh

Hitesh, the javascript Api you are using for opening Modal window, is specially for oa framework, as framework uses the same method to open a LOV.While in JTT there is no such available API, for that you have to use normal
window. open.... (in javascript)
that you use in any web tech like jsp etc, and attach it to button or link click.
--Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Open a pop-up from a chart

    Hi,
    I am trying to open a pop-up window from a chart (bar graph: user clicks on bar/column and pop-up opens). I can open another page using a url ('f?p=100:200:...::::' etc) as described in documentation / how-to pages;
    select
    'f?p=100:200: ...' link,
    a label,
    b value
    from my_table
    However is it possible to pop-up the page in a separate window ?
    Thanks for all and any help!
    sinclair

    You could use Apex's built in javascript popUp function:
    select
    ('javascript:popUp2("f?p=100:200: ...");') link,
    a label,
    b value
    from my_table
    You can pass two futher optional parameters to popUp2 if you want - width and height of window that pops up e.g. popUp2('f?p=100:200',300,400)
    Andrew

  • Open browser pop up from an exe file

    Hi
    Can you help me with this?:
    I have to open an internet browser pop up from a movie, that
    is an exe file...
    And I don´t know how to do it... :(
    I´ve seen the manuals, but all the instruccions are for
    a movie that is into an html file, and this is not my case...
    thanks a lot!
    Sofia

    Hi, LuigiL...
    but... with getURL() I can´t restrict the dimensions of
    the window....
    I need a window of 1008x650 pixels exactly with no scrollbar.
    How can I do it?
    thanks again

  • Exception While Opening a Pop Up From Pivot Table

    Hi,
    I actually created a pivot table which has the cell data filled with images. I would like to have these images to function as 'CommangImageLink' and onclick of the image ... should open a popup to display the details about that intersection.
    For ex : I have Products Vs State as Row & Column Header. For each intersection of Product Vs State .... depends upon the availability of the inventory should render an image. And on click of the image .. should display the details of the inventory for that intersection in a pop up.
    Does any one of you have any idea about this.
    FYI ... here is the piece of code which im using. When use this code ... getting the below mentioned exception.
    <dvt:pivotTable id="pt1" var="cellData" varStatus="cellStatus"
                          inlineStyle="width:800px;height:350px"
                          value="#{bindings.MecOverviewJobsVO.pivotTableModel}"
                          binding="#{backingBeanScope.backing_jsff_mecStatusview.pt1}"
                          sizing="auto" pivotLabelVisible="false">
            <dvt:dataCell>
              <!--af:activeImage source="#{cellData.dataValue == 0 ? '/images/green.jpg;':(cellData.dataValue == 1? '/images/yellow.jpg;':(cellData.dataValue == 2?'/images/red.jpg;':(cellData.dataValue == 3?'/images/blue.jpg;':'/images/white.JPG;')))}"
                              binding="#{backingBeanScope.backing_jsff_mecStatusview.ai1}"
                              id="ai1"/-->
                              <af:commandImageLink id="cil1" icon="#{cellData.dataValue == 0 ? '/images/green.jpg;':(cellData.dataValue == 1? '/images/yellow.jpg;':(cellData.dataValue == 2?'/images/red.jpg;':(cellData.dataValue == 3?'/images/blue.jpg;':'/images/white.JPG;')))}"
                                                   actionListener="#{backingBeanScope.backing_jsff_mecStatusview.imageClicked}"/>
              <af:popup id="showDetailsPopUp"
                        binding="#{backingBeanScope.backing_jsff_mecStatusview.showDetailsPopUp}">
                    <af:dialog id="d1" title="Hi..."/>
              </af:popup>
            </dvt:dataCell>
          </dvt:pivotTable>EXCEPTION ..........
    DCUtil> <findSpelObject> [7517] DCUtil, returning:oracle.adfinternal.view.faces.dvt.model.binding.pivotTable.FacesPivotTableBinding, for MecOverviewJobsVO
    <UIXRegion> <_warn> Error processing viewId: /mecui-flow/mecStatusview URI: /jsff/mecStatusview.jsff actual-URI: /jsff/mecStatusview.jsff.
    oracle.dss.util.transform.TransformRuntimeException: DVT-2015 Slice -1 exceeds boundary 9.
    oracle.dss.util.SliceOutOfRangeException: DVT-2015 Slice -1 exceeds boundary 9.
         at oracle.dss.util.transform.CubicDataAccess.getValue(CubicDataAccess.java:908)
         at oracle.dss.util.transform.CubicDataAccess.getValue(CubicDataAccess.java:1448)
         at oracle.adf.view.faces.bi.component.pivotTable.UIPivotTable.getCurrentCellContext(UIPivotTable.java:1202)
         at oracle.adf.view.faces.bi.component.pivotTable.UIPivotTable.getStamps(UIPivotTable.java:1113)
         at oracle.adf.view.faces.bi.component.pivotTable.UIGrid._restoreStampState(UIGrid.java:1362)
         at oracle.adf.view.faces.bi.component.pivotTable.UIGrid.postCellDataChange(UIGrid.java:830)
         at oracle.adf.view.faces.bi.component.pivotTable.UIPivotTable.postCellDataChange(UIPivotTable.java:1315)
         at oracle.adf.view.faces.bi.component.pivotTable.UIGrid.setCellKey(UIGrid.java:506)
    <DCIteratorBinding> <releaseDataInternal> [7527] Releasing iterator binding:MecOverviewJobsVOIterator
    <RegistrationConfigurator> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
    oracle.dss.util.transform.TransformRuntimeException: DVT-2015 Slice -1 exceeds boundary 9.
    oracle.dss.util.SliceOutOfRangeException: DVT-2015 Slice -1 exceeds boundary 9.
         at oracle.dss.util.transform.CubicDataAccess.getValue(CubicDataAccess.java:908)
         at oracle.dss.util.transform.CubicDataAccess.getValue(CubicDataAccess.java:1448)
         at oracle.adf.view.faces.bi.component.pivotTable.UIPivotTable.getCurrentCellContext(UIPivotTable.java:1202)
         at oracle.adf.view.faces.bi.component.pivotTable.UIPivotTable.getStamps(UIPivotTable.java:1113)
         at oracle.adf.view.faces.bi.component.pivotTable.UIGrid._restoreStampState(UIGrid.java:1362)
         at oracle.adf.view.faces.bi.component.pivotTable.UIGrid.postCellDataChange(UIGrid.java:830)
         at oracle.adf.view.faces.bi.component.pivotTable.UIPivotTable.postCellDataChange(UIPivotTable.java:1315)
         Thanks & Regards,
    Kiran Konjeti

    Hi Frank,
    Thank you very much for your reply.
    Yes. The active image code was commented and we are not using it.
    And i tried with placing the pop up outside of pivot table but still getting the same issue.
    JDev Version : Build JDEVADF_11.1.1.5.0_GENERIC_110409.0025.6013
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:dvt="http://xmlns.oracle.com/dss/adf/faces">
      <af:panelStretchLayout binding="#{backingBeanScope.backing_jsff_mecStatusview.psl1}"
                             id="psl1" bottomHeight="87px" startWidth="30px"
                             endWidth="30px">
        <f:facet name="center">
          <dvt:pivotTable id="pt1" var="cellData" varStatus="cellStatus"
                          inlineStyle="width:800px;height:350px"
                          value="#{bindings.MecOverviewJobsVO.pivotTableModel}"
                          binding="#{backingBeanScope.backing_jsff_mecStatusview.pt1}"
                          sizing="auto" pivotLabelVisible="false">
            <dvt:dataCell>
              <af:commandImageLink id="cil2" icon="/images/green.jpg" iconPosition="leading" rendered="#{cellData.dataValue == 0}" actionListener="#{backingBeanScope.backing_jsff_mecStatusview.imageClicked}"/>        
            </dvt:dataCell>
          </dvt:pivotTable>
        </f:facet>
        <f:facet name="bottom">
          <af:panelGroupLayout binding="#{backingBeanScope.backing_jsff_mecStatusview.pgl1}"
                               id="pgl1">
             <af:popup id="showDetailsPopUp"
                        binding="#{backingBeanScope.backing_jsff_mecStatusview.showDetailsPopUp}">
                    <af:dialog id="d1" title="Hi..."/>
              </af:popup>
         </af:panelGroupLayout >
       </f:facet >
      </af:panelStretchLayout>
    </jsp:root>Please let me know your comments.
    Thanks & Regards,
    Kiran Konjeti

  • I downloaded FF4 and now can't open any pop-ups from any sites.

    When I click on a link, the little pop-up blocker appears. If I hold "control" and click the link, it opens up a new blank tab. I've turned off both the "block pop-up windows" in the Options tab and Adblock Plus but that hasn't done anything.
    Any suggestions? Thanks.

    What does the little popup blocker look like? Firefox usually displays an infobar below the address/location bar with an Options button. If you are seeing something else, perhaps it is a feature of another add-on? I would especially check any toolbars installed by your antivirus or other security software.

  • Prevent pop ups from opening in safari

    Despite I prevented pop ups from opening in Safari in preferences; they still keep popping up. I installed two add block extensions but in-vain.

    There is no need to download anything to solve this problem. You may have installed a variant of the "VSearch" ad-injection malware.
    Triple-click the line below on this page to select it, then copy the text to the Clipboard by pressing the key combination  command-C:
    /Library/LaunchDaemons
    In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.
    A folder named "LaunchDaemons" may open. Look inside it for a file with a name of the form
              com.something.daemon.plist
    Here something is a variable word, which can be different in each case. It could be "cloud," "dot," "highway," "submarine," "trusteddownloads," or pretty much anything else.
    There may also be a file named
               com.something.helper.plist
    in the same folder.
    Leave the LaunchDaemons folder open, and open the following folder in the same way:
    /Library/LaunchAgents
    In this folder, there may be a file named
              com.something.agent.plist
    where the word something is exactly the same as before.
    If you feel confident that you've identified these three files, back up all data, then drag the three files you found to the Trash. You may be prompted for your administrator login password. Close the windows and restart the computer.
    Don't delete the "LaunchAgents" or "LaunchDaemons" folder or anything else inside either one.
    The malware is now permanently inactivated, as long as you never reinstall it. You can stop here if you like, or you can remove two remaining components for the sake of completeness.
    Open this folder:
    /Library/Application Support
    If it has a subfolder named just
               something
    (where something is the same word as before), drag that subfolder to the Trash and close the window.
    Don't delete the "Application Support" folder or anything else inside it.
    Finally, in this folder:
    /System/Library/Frameworks
    there may an item named exactly
                v.framework
    It's actually another folder, though it has a different icon. Drag it to the Trash and close the window.
    Don't delete the "Frameworks" folder or anything else inside it.
    If you didn't find the files or you're not sure about the identification, post what you found.
    If in doubt, or if you have no backups, change nothing at all.
    The trouble may have started when you downloaded and ran an application called "MPlayerX." That's the name of a legitimate free movie player, but the name is also used fraudulently to distribute VSearch. If there is an item with that name in the Applications folder, delete it, and if you wish, replace it with the genuine article from mplayerx.org.
    This trojan is often found on illegal websites that traffic in pirated content such as movies. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect more of the same, and worse, to follow. Never install any software that you downloaded from a bittorrent, or that was downloaded by someone else from an unknown source.
    In the Security & Privacy pane of System Preferences, select the General tab. The radio button marked Anywhere  should not be selected. If it is, click the lock icon to unlock the settings, then select one of the other buttons. After that, don't ignore a warning that you are about to run or install an application from an unknown developer.
    Then, still in System Preferences, open the App Store or Software Update pane and check the box marked
              Install system data files and security updates (OS X 10.10 or later)
    or
              Download updates automatically (OS X 10.9 or earlier)
    if it's not already checked.

  • Opening an ADF page from an OA framework page

    Hello,
    We have an OA framework page (a custom app) deployed in Oracle 9i Application server. We intend to develop some ADF pages which will be deployed in a separate Oracle 10g AS. I would like to know if it is possible to open an ADF page from an OA page and the basic interoperability between them. If someone can throw some light on the feasibility of this approach, it would really be helpful. Are there any material available on this?
    Please let me know your thoughts on this. Thanks in advance
    Raja

    You way want to ask this on the OA Forum as well.
    Because you are running the apps on different servers the interoperability can only be through the db layer. I'm not aware of a solution where the apps are running in the same context, meaning you can't have an transaction spanning both apps.
    To open a page of an other app is simply done by putting a link in one app which points to the second app.
    Timo

  • "Firefox prevented this site from opening a pop-up window" - Interface with Kerio Connect 7.0.0 -

    I'm in a regional office. Corporate uses Kerio Connect 7.0.0 for email. Today 5/7/10 I started having problems whenever I open an email of ANY type, I can view it in viewing pane, but double clicking it gives me the message "Firefox prevented this site from opening a pop-up window." NOBODY ELSE in my company has had this problem (I have had it happen a few times in the past, but not ALL emails like today!). I am on my own in a regional office, so guidance would be greatly appreciated.

    I have tried this and it is not working. The only thing I can think of is that Firefox automatically upgraded to the 3.5 version I believe sometime last week, which is when I truly began to see the problem.
    No wonder I have avoided upgrading! It seems to me that Firefox STILL has not corrected this problem.
    I have seen multiple people as late as last week complaining @ same issue and they are reverting back to FF 3.0.
    Sound like this is my only solution.
    If anyone has any other ideas, please let me know.

  • Just updated my iMac to OS X Yosemite and my Photoshop will no longer open. Pop up message informing Some of the application components are missing from the Application directory. Please reinstall the application. I have the pay monthly package and don't

    Just updated my iMac to OS X Yosemite and my Photoshop will no longer open. Pop up message informing, Some of the application components are missing from the Application directory, Please reinstall the application. I have the pay monthly package and don't know where to start.

    Do as it says: Reinstall the program. Run the cleaner tool and let CC app do the magic.
    Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6
    Mylenium

  • Unable to open any popup - including from Firefox Menu. This renders me unable even to reset firefox. What could be blocking the pop-ups?

    These aren't pop-ups from websites but menu pop-ups etc. For instance, when I try to go to Help, Restart Firefox, the menu popup is blank.

    Try to disable hardware acceleration in Firefox.
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    *https://hacks.mozilla.org/2010/09/hardware-acceleration/

  • HT3775 BDMV" can't be opened because it is from an unidentified developer.  How do I solve this?? Am I losing all the video files I have in my camcorder??? Please help me!!! Thanks

    I am downloading the memory card from my camcorder into my MacBook Pro with Retina display. It usually popped to the file called AVCHD then CLIP to show all the videos. But not this time, it automatically changed to BDMV. I do not have idea how this happened while I left my notebook on and I was away for a couple of hours then back to the living room to work on each video as to type name of file etc.
    Now, I cannot even open them into CLIP because I am still getting BDMV with a popped sign that said BDMV can't be opened because it is from an unidentified developer. (I do not even understand what this is supposed to mean??) also with the bottom message that stated "Quicktime Player created this file yesterday at 1:52pm"  I am like uhhh how can QT player do this without my authorization??
    Please help me how to solve these and get all of my videos back that I saved in my camcorder.  Let you know that I tried to insert the memory card back into my camcorder and all these videos are gone.   Now I am having a HUGE headache because of this!!
    What should I do now???

    HI,
    Did you ever figure out how to get them back? The same thing happened to me yesterday. I was able to open the file in VLC media player (you can download this app), but the file had been corrupted. It was only the last clip I had recorded, all the others were lost. Even the clip that will play is messed up

  • POWL OBN links do not open a pop up window in one domain

    Hi
    I am hoping to get some helpful information on a problem with a POWL OBN links not opening a pop-up only in one domain. The issue is described below.
    We have deployed the BP for Buyer 1.0, SP15. One of the iViews we use is the My Purchasing Documents and we have enabled the query POWL_PR_MY. Our Portal Version is 7.0 SP21, ECC6 (no EHP).
    Query POWL_PR_MY (My Purchase Requisitions) of POWL Application OPS-BUYER-POWL-PURDOC has links with the Purchase Requisition Number. Ideally when the links are clicked on, it should open up the Purchase Requisition transaction with the details of the item. This does not happen in our case.
    Our Portal Server is on the domain main.nex.com, but is accessed from the domain drs.nex.com. The ECC is also on the main.nex.com domain.
    When we access this application using "portal.main.nex.com", the links work fine as they should. But when we access the application using "portal.drs.nex.com", they do not open at all. There is no error message displayed. It just simply does not do anything.
    We have added *.main.nex.com to our local intranet trusted sites and have enabled pop-ups, added the proxy exception
    *.main.nex.com. All the Pop-ups are working from the other Custom Webdynpro application and from the other SAP GUI for HTML transactions in the portal from domain "drs.nex.com".
    I am not sure what the problem is, but we are facing a problem ONLY with this application's links. I am not able to see anything in the nwa logs too.
    Any pointers as to where I can look for issues?
    Thanks
    OJ

    Hi Malte
    No luck yet - so we are currently using portal.main.nex.com to access our portal until we find a solution. Will keep you posted. In the meanwhile, if you do find some information, please update.
    Thanks
    OJ

  • I want to open a pop-up

    I have Snow Leopard and am fully updated on Safari: Safari: Version 4.0.4 (6531.21.10).
    Safari will not allow me to open a pop-up at this site. Here's the site: http://ancientfaith.com/. On this page you will see a box titled Music and a button that says "Play in Popup." But when I click on it, it will only open a new tab. The pop-up works fine in Camino; it just won't work in my Safari.
    I have Block Pop-up Windows turned off in Safari. I also have Safari configured to open new links in a tab with Command-Click. I have tried unchecking that box in Preference and have tried various key combinations; but no matter what I do, the box opens in a new tab.
    Any ideas how I can get that button to open a pop-up window? Are you able to get that button to work in your browser?
    TIA.

    Thanks, Bee, for the suggestions. Yes, I do have Flip-4-Mac, and Safari is configured as you suggest.
    But I think I may have figured out the problem. A while back I configured Safari to open a tab instead of a new window with a single mouse click. I did this by opening Terminal and typing in this command: *defaults write com.apple.Safari TargetedClicksCreateTabs -bool true*.
    I imagine that this command is now preventing me from opening a pop-up window. Does that sound likely?

  • How do I reinstate the information bar that shows the prevention of opening a pop-up window?

    After Firefox opened the information bar telling me they blocked a pop-up window I inadvertently clicked the option link and deleted the information bar from coming up again.
    How do I reinstate the information bar that shows the prevention of opening a pop-up window?
    == This happened ==
    Just once or twice
    == I clicked the option link and selected the "do not show this again" option

    I set browser.popups.showPopupBlocker to false, and information bar still appears.
    When I also set privacy.popups.showBrowserMessage to false, it doesn't appear.
    To test, whether the information bar appears, I use
    [http://www.popuptest.com/popuptest3.html]
    So, set to true preferences
    privacy.popups.showBrowserMessage
    and
    browser.popups.showPopupBlocker
    Both of them!!!
    Does it help you?

  • Opening an HTML popup from Flash, not as tab

    Hi
    I need to open an HTML popup from Flash (using ActionScript in
    Flex 4).
    Thus far I found a solution, and it does work in Safari - a new
    and separate HTML window is popped up (with a new web page).
    private function popUpTheHtmlEditor():void {
      var url:String = "http://www.adobe.com";
      var request:URLRequest = new URLRequest(url);
      try {
        navigateToURL(request, '_blank');
      } catch (e:Error) {
        trace("Error occurred!");
    But in (my) Firefox (with my settings), when I click on the Flash
    (Flex) button, the page is being opened in a new tab.
    I need a solution which pops up the HTML page in a new/separate
    window, as far as possible regardless of the browser (and browser
    settings).
    I found an example where a popup is opened from HTML, and it opens a
    separate window (a real popup) in my Firefox:
    http://www.gtalbot.org/FirefoxSection/Popup/PopupAndFirefox.html
    -> "Open a requested popup"
    The JavaScript code seems to be:
      OpenRequestedPopup(this.href, this.target); return false;
    with this function def:
      function OpenRequestedPopup(strUrl, strTarget)
        if (WindowObjectReferenceOfRequestedPopup == null || WindowObjectReferenceOfRequestedPopup.closed)
        WindowObjectReferenceOfRequestedPopup = window.open(strUrl, strTarget, "top=" + windowTop + ",left=" + windowLeft + ",width=" + windowWidth + ",height=" + windowHeight + ",menubar,toolbar,location,resizable,scrollbars,status");
        else
        if(WindowObjectReferenceOfRequestedPopup.focus)
          WindowObjectReferenceOfRequestedPopup.focus();
    How could I call such code from ActionScript? Should this work through
    ExternalInterface? I couldn't even get this to work:
      ExternalInterface.call('alert', 'foo');
    Should I use swfobject.js for embedding the .swf in the HTML wrapper?
    Any other ideas?
    The two files are pasted below.
    Here's the compiler command I'm using:
      mxmlc -output button.swf -target-player 10.0.0 flash_to_editor.mxml
    I'm running the examples locally (as files, not over http). Would it
    help to place the files on a server?
    Tobi
    <?xml version="1.0" encoding="UTF-8"?>
    <mx:Application
      xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx"
      horizontalAlign="center" verticalAlign="middle">
      <fx:Script>
        <![CDATA[
    import mx.controls.Alert;
    import flash.external.ExternalInterface;
    import flash.net.URLRequest;
    // This 'http://www.adobe.com' is just an example URL.
    // Works but opens tab in FF (not a separate window):
    private function popUpTheHtmlEditor():void {
      var url:String = "http://www.adobe.com";
      var request:URLRequest = new URLRequest(url);
      try {
        navigateToURL(request, '_blank');
      } catch (e:Error) {
        trace("Error occurred!");
    // Doesn't work:
    // var url:URLRequest = new URLRequest("javascript:alert('foo'); void(0);");
    // navigateToURL(url, "_self");
    // How to get this to work?
    private function popUpTheHtmlEditor():void {
      ExternalInterface.call('alert', 'foo');
    // How to get this to work?
    private function popUpTheHtmlEditor():void {
      ExternalInterface.call('launch','http://www.adobe.com');
      // Or
      // ExternalInterface.call("window.open", "http://www.adobe.com", "win", "height=200,width=300,toolbar=no,scrollbars=yes");
    // Perhaps it's necessary to try different approaches:
    // (As soon as I get two approaches to work.)
    private function popUpTheHtmlEditor():void {
      var s:String;
      if (ExternalInterface.available) {
        // Necessary? Safe?:
        // Security.allowDomain('*');
        s = ExternalInterface.call('launch','http://www.adobe.com');
      } else {
         // TODO: Then try URLRequest?
         s = "Wrapper not available";
      Alert.show(s);
        ]]>
      </fx:Script>
      <s:Panel title="One way to open the HTML editor"
      width="75%" height="75%">
        <s:Button id="button" label="Open the HTML editor"
        click="this.popUpTheHtmlEditor();"
        horizontalCenter="0" verticalCenter="0"/>
      </s:Panel>
    </mx:Application>
    <html
      xmlns="http://www.w3.org/1999/xhtml"
      xml:lang="en" lang="en">
      <head>
        <title>html_around_swf.html</title>
        <script type="text/javascript">
    function launch(url) {
      alert(url);
      //  OpenWin = this.open(url, "FOO", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,width=400,height=200");
        </script>
      </head>
      <body>
        <object id="button" name="button" width="550" height="400"
        classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">
          <param name="movie" value="button.swf" />
          <param name="allowScriptAccess" value="always" />
          <embed id="foo" name="button" src="button.swf" width="550" height="400"></embed>
        </object>
      </body>
    </html>

    Hi, 
    Here's a solution.
    1. Make ExternalInterface work when files are loaded as local files: 
    Go to
    http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.htm l 
    In tab Global Security Settings: Edit Locations -> Add Location ->
    browse to the .swf file, add it. Make sure it's in the list (under the
    Edit Locations drop down, with a green check mark.) 
    Now open the HTML wrapper in a browser (eg Firefox). 
    Now this works (ActionScript): 
    private function popUpTheHtmlEditor():void {
      ExternalInterface.call('alert', 'foo');
    On Windows: perhaps:
    http://techjig.blogspot.com/2008/03/flash-global-security-settings-windows.html
    "In order for external interface functions to be called, you must also
    specify the folder/file where the swf file is located." 
    The above setup isn't necessary when the files are on a server. 
    Also see: 
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/external/External Interface.html#call()
    ""ExternalInterface" "
    "call() method" 
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7ea6.html
    "About ExternalInterface API security in Flex" 
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf626ae-7fe8.html#WS2d b454920e96a9e51e63e3d11c0bf69084-7f31
    "Using the ExternalInterface API to access JavaScript" 
    2. Open a real popup: Example: 
    ActionScript: 
    private function popUpSomething():void {
      var editorPathOrUrl:String =
        'wrapper.html';
      var windowName:String =
        "SomeNameSeeDocs";
      var windowFeatures:String =
        "toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes,width=500,height=700";
      ExternalInterface.call(
        'launch',editorPathOrUrl,windowName,windowFeatures
    JavaScript: 
    function launch(editorPathOrUrl,windowName,windowFeatures) {
      windowRef = window.open(
        editorPathOrUrl,windowName,windowFeatures
    Works in all browser I tested except Opera. 
    Tobi

Maybe you are looking for

  • Problem with bapi_po_create1 missing payment terms

    Hi All, I am using LSMW and BAPI method to create PO. I am using BAPI_PO_CREATE1 and providing the payment terms in my load file. The PO is created succesfully but the PO doesnt have the payment terms. I have the update value X. Is there anyway to fi

  • Should I use a Hashtable ?

    I need to implement an orderdered list of objects (essentialy a queue). I estimate the maximum size of the list to be 2 million objects! Through out the processing of my application I will need to insert objects at various locations through out the l

  • EA2700 log file

    Time Warner techs have been to my house once a week for a month and a half. They don't seem to know what to do on the Internet side of their business. A couple of times they have tried to blame my router, which always turns out to NOT be the problem.

  • Adobe Reader newest version

    I Cannot get a recent version of Adobe Reader to install.  I had version 9.5.5 and it would not open my bank statements.  Well Fargo informed me I needed a later version.  I have uninstalled 9.5.5 thinking that might help.  It didn't.  Have windows e

  • All programs crash after Time Machine restore

    After noticing that Photoshop hung the system every time I tried to open it, I ran a disk utility scan on my system disk. It came back that my hard drive was bad. I purchased a new hard disk, installed it into my Mac Pro, booted from my Snow Leopard