Javascript to enable button and open popup needed

Hello all,
I have a form with a report that contains a checkbox. The user is to provide a document id which is applied to all checked items in the report. The problem is I need them to view the document referenced first and verify it is correct.
My approach has been ...
1) disable the apply button
2) create a validate document button
3) when validate is pressed open popup with document displayed, as well as enable apply button
4) Provide button on display screen to close the popup window
5) When apply button is pressed use a cursor to update all marked records
The problem I am running into is I can get the javascript on button press to open the new window, or to enable the button, but not both. I have tried with inline javascript as well as with a function in the page header.
Any help would be greatly appreciated.
--Adam Cumming, Marion County, OR ([email protected])                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Wouldn't you know it. As soon as I post to the forum I figure it out...
FYI here is the function that works...
function html_EnableItem(a)
var Elem_1 = document.getElementById(a);
Elem_1.disabled = false;
var LF_View = window.open('f?p=&APP_ID.:120:&SESSION.:::::', 'LF_Preview', 'width=800, height=600, toolbar=0, status=0');
}

Similar Messages

  • At event calendering site, getting message "There was a problem with your event submission. If you have disabled JavaScript please enable it and try your submission again." Javascript is ENABLED on my computer.

    I'm trying to submit an event to the events calendar at http://calendar.jtnews.net/events/index.php?com=submit. After I enter the Authentication words and press Enter, I get the message, "There was a problem with your event submission. If you have disabled JavaScript please enable it and try your submission again." According to my Firefox/Tools, etc., button, Javascript is enabled. I

    Hello mjswooosh,
    I'm very disheartened to hear that you've had ongoing problems when attempting to order from BestBuy.com. Our goal is ever to provide a fun and efficient shopping environment! Certainly creating aggravation serves neither you nor us and I apologize sincerely for this having been your experience.
    We recommend the troubleshooting steps you mentioned (i.e., clearing the browser cache, deleting temporary internet files and cookies) because this is the most common cause of this type of problem. I too have encountered this issue from time to time and these steps have almost always resolved the problem. I say almost always because there's one further step you can try: ensure that you have signed out of BestBuy.com, then perform the browser maintenance steps we've recommended. Afterward, before signing in to BestBuy.com, add your desired items to your cart and sign in as part of the checkout process. When the standard steps have not netted a resolution for me, this has solved the problem each time.
    I hope this helps. I'm very grateful that you took the time to write to us with your concerns and for sharing your very valuable feedback about your online experience.
    Sincerely,
    John|Social Media Specialist | Best Buy® Corporate
     Private Message

  • How to make it selected when clicked and open popup

    Hi,
    I 've a form in the parent page with many form elements.
    I've 2 radio buttons with values "Yes" and "No". I am opening a modal popup when clicked on "Yes" radio button. The modal popup is opening fine.
    But when I click "Yes", it' s not selected. After modal popup is closed, when I return to parent page, the option "Yes" is still not selected.
    How to make it selected when clicked and open popup?

    Perhaps try moving the application to your preferred desktop and then right-click it's dock icon > options > Assign to This Desktop.

  • When I use my Delete key to delete a song, I get a pop-up.  This is OK, except the Keep File button is defaulted and I cannot tab or arrow to the "Move to Trash" button, and so i need to use my mouse.  How can I do this only with keyboard?

    When using iTunes on my iMac, I use my Delete key to delete a song and I get a pop-up.  This is OK, except the Keep File button is defaulted and I cannot tab or arrow to the "Move to Trash" (or Cancel) button, and so I need to use my mouse.  How can I do this only with keyboard?

    Huh.. Interesting. I went back to check these proceedures and found there is a difference between using the return key or the space bar as the action command.
    tabbing the blue ring moves the selection and then spacebar takes that action. The return key takes action of only the blue collored button.
    .... learn somting new every day, even if it is somthing I previously forgot

  • I used to open, bbc radio 2, with a left click on the 'listen' tab? this now longer responds, I have to now right click the mouse button and open link in a new tab? whats wrong

    I used to be able to open BBc Radio 2 via the 'Listen' link with a left click of the mouse button, this nolonger works, I now have to right click the link and 'open link in a new tab'
    I must have disabled something?
    If you can help then please make it easy for me to understand.
    Thanks
    Regards
    Rj

    2 Solutions found in [http://support.mozilla.com/en-US/questions/791244]
    the user cor-el has a method that does not require any add-ons. He States
    This code in userChrome.css will move "Open Link in New Window" to the top of the context menu.
    <pre>@namespace url("<a href="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul</a>"); /* only needed once */
    #contentAreaContextMenu &gt; * { -moz-box-ordinal-group: 2; }
    #context-openlink { -moz-box-ordinal-group: 1 !important; }</pre>
    the user jay_ff shows how to do it using the Menu Editor Add-on
    1. Install the Menu Editor add-on from https://addons.mozilla.org/en-US/firefox/addon/menu-editor/ .
    2. After the installation, go to Firefox> add-ons (or simply use Ctrl+Shift+A)
    3. Go to the Menu Editor "Options"
    4. In the "Main context menu," simply grab the "Open link in New Tab" and place it below the "Open Link in New Window"
    5. and Voila! You may also change other menu options if you want to!
    I tried jay_ff method first and found that indeed changing the Main Context Menu did cause the hotlink context menu to change as well.

  • Adobe Designer 7.0 save button and ID system needed

    Hello, I need help with create save button what works with older version too.
    I have Adobe designer 7.0 pro
    After click save button you can not changes anymore information.
    Then I need ID making system. It would be club ID. ID will be include personal sex, birthday, and filling date.
    EX: 3290580020505 ( 3- male (4-female), 29.05.80 birthday (day,month,year), 02.05.05 means filling date. (day,month,year)
    When person will fill application and she/he choose sex, birthday, then automatically its will create the ID and its possible to see in ID form.
    Then When click Save button then what is ID number then automatically it adds end of the application form name.
    EX: ID is "3290580020505" and pdf application name is "New member". Then After Save name changes "New member- 3290580020505"
    How it is possible to do and when you do not understand what I mean pls let me know.
    I really need something similar system.

    LiveCycle Reader Extensions Server is server product that is used to unlock or activate functionalities in Reader that only otherwise available in Acrobat. By enabling rights to PDF documents, this allows end users who are using Reader to save, fill in, annotate, sign, and submit PDF documents...
    To learn more about LiveCycle Reader Extensions Server, go to
    http://www.adobe.com/products/server/readerextensions/main.html

  • How to add Javascript action to buttons and text (hyperlink style)

    Hello.
    Please need help urgently!
    I need to link let's say to a text in Muse that reads "ADD TO CART" following javascript:
    <a href="javascript:;" onclick="wazala_widget.addtocart('177217');"
    If i do it like:
    <a href="javascript:;" onclick="wazala_widget.addtocart('177217');">ADD TO CART</a>
    then text styling is different from the Muse Hyperlink settings  that chose for other hyperlinks on my site which is obviously an undesirable effect.
    If i try to style this specific ADD TO CART text within the html widget widnow:
    <style type="text/css">
    <!--
    body {text-align:center;}
    body {vertical-align:middle;}
    A:link { COLOR: white; TEXT-DECORATION: none; font-weight: normal; font-family: palatino; font-size: 12px }
    A:visited { COLOR: white; TEXT-DECORATION: none; font-weight: normal; font-family: palatino; font-size: 12px }
    A:active { COLOR: white; TEXT-DECORATION: none; font-weight: normal; font-family: palatino; font-size: 12px }
    A:hover { COLOR: white; TEXT-DECORATION: none; font-weight: normal; font-family: palatino; font-size: 12px }
    -->
    </style>
      <a href="javascript:;" onclick="wazala_widget.addtocart('177217');">ADD TO CART</a>
    Then it overrides Muse hyperlink settings for all hyperlinks located below this button on the page.
    Any help would be highly appreciated as this is the only thing that stops me from going live with my shop.

    Dis you ever get an answer to this?
    Ben

  • Flash Buttons and UI Components need double click to work. Any Solution?

    Hi,
    I have just finished making an application for Kiosk in Flash. However while testing I noticed that the buttons I used and UI components like textfield, textarea, radiobuttons, etc need to be touched twice to make them function. Can anyone tell why this happens and how to solve this issue? Its very frustrating for a user to keep clicking on the component to make it active first and then make it work.
    Note: Is it like Flash UI components need time to get active on screen and then they function?
    Thanks in advance.

    Thanks for the reply ReshapeMedia.
    What I want to say is I have a Flash exe file which contains feedback form for customers. This exe is displayed on Kiosk where user can interact with it using touch screen. The problem here is - when user touches (clicks) on the input field on screen or selects a radio button, it takes him several attempts to do so. In other words, user keeps on touching and tapping to activate the input field first and then somehow it gets activated and after multiple touches it allows them to enter the data/ radio button is selected and other buttons functions.
    This obviously adds to users frustration.
    This application is not loaded in IE so there is no browseer involved here.
    You mentioned a script trigger a mouse click. What is that? (I have addEventListener on my buttons already) Kindly explain a bit. Thanks a lot.

  • Open popup window and bring text to opener window jsp [help~]

    how to click a button then open popup window.
    and add somthing in the popup window, that can bring the text in the popup window to opener window in jsp.

    This is a javascript/html question, and has nothing to do with Java/JSP.
    You could do it with plain javascript/html using window.opener.
    I would recommend using something like a [YUI 2 Panel|http://developer.yahoo.com/yui/container/panel/] to do it.
    Opening new windows is a thing of the past.

  • I have a m-audio producer usb microphone and since the update on Dec. 22, 2013 Logic hasn't been allowing me to record with it. Logic is reading the microphone as the input but the audio tracks don't have the record enable button. What's wrong?

    I have a m-audio producer usb microphone and since the update on Dec. 22, 2013 Logic hasn't been allowing me to record with it. Logic is reading the microphone as the input but the audio tracks don't have the record enable button and won't let me select an input for the audio track on the inspector panel. What are some possible solutions.

    Certain M-Audio USB devices (along with some other USB2 class compliant devices that don't use drivers) no longer work with Logic Pro X 10.0.5
    At this time it is unknown as to why this has happened. Nor is it known if Apple will need to fix it or if it is up to the Developers of said USB2 devices  to remedy the problem.
    In the mean time, assuming you made/could make backups prior to updating to 10.0.5.... the solution is to roll back to LPX 10.0.4...

  • JDeveloper 11.1.2.1, IE8 and erratic popup behavior

    I am trying to do a simple proof of concept in JDeveloper 11.1.2.1 involving a databound table and a popup. I want to add a row to the table by filling in a form on the popup. The popup is opened via an action by clicking a button in the form. I used the Code Corner example #77 as a template for adding rows. Using IE8 (not in compatibility mode), I click on the "Add" button and the popup opens. However, error messages in the dialog also appear indicating that non-null fields require values. Here's where it gets interesting. If I create the exact same form, managed bean, entity/view objects in JDeveloper 11.1.1.6, then everything works fine while adding rows. I am guessing I am missing some sort of property setting, but I have yet to find it. I am new to JDeveloper/ADF. Form structure and managed bean code is below. Any ideas?
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <af:document title="popuptest.jsf" id="d1">
    <af:messages id="m1" inline="false"/>
    <af:form id="f1">
    <af:table value="#{bindings.allDepartments.collectionModel}" var="row"
    rows="#{bindings.allDepartments.rangeSize}"
    emptyText="#{bindings.allDepartments.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.allDepartments.rangeSize}" rowBandingInterval="0"
    selectedRowKeys="#{bindings.allDepartments.collectionModel.selectedRow}"
    selectionListener="#{bindings.allDepartments.collectionModel.makeCurrent}" rowSelection="single"
    id="t1" partialTriggers="::cb1" binding="#{CreateDepartmentPageHelper.departmentsTable}">
    <af:column sortProperty="#{bindings.allDepartments.hints.DepartmentId.name}" sortable="false"
    headerText="#{bindings.allDepartments.hints.DepartmentId.label}" id="c1">
    <af:outputText value="#{row.DepartmentId}" id="ot1">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.allDepartments.hints.DepartmentId.format}"/>
    </af:outputText>
    </af:column>
    <af:column sortProperty="#{bindings.allDepartments.hints.DepartmentName.name}" sortable="false"
    headerText="#{bindings.allDepartments.hints.DepartmentName.label}" id="c2">
    <af:outputText value="#{row.DepartmentName}" id="ot2"/>
    </af:column>
    <af:column sortProperty="#{bindings.allDepartments.hints.ManagerId.name}" sortable="false"
    headerText="#{bindings.allDepartments.hints.ManagerId.label}" id="c3">
    <af:outputText value="#{row.ManagerId}" id="ot3">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.allDepartments.hints.ManagerId.format}"/>
    </af:outputText>
    </af:column>
    <af:column sortProperty="#{bindings.allDepartments.hints.LocationId.name}" sortable="false"
    headerText="#{bindings.allDepartments.hints.LocationId.label}" id="c4">
    <af:outputText value="#{row.LocationId}" id="ot4">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.allDepartments.hints.LocationId.format}"/>
    </af:outputText>
    </af:column>
    </af:table>
    <af:commandButton text="Add" id="cb1" partialSubmit="true"
    action="#{CreateDepartmentPageHelper.cb1_action}"/>
    <af:popup autoCancel="enabled" id="p1"
    binding="#{CreateDepartmentPageHelper.popup}"
    contentDelivery="lazyUncached" eventContext="self">
    <af:dialog id="d2">
    <f:facet name="buttonBar"/>
    <af:panelFormLayout id="pfl1">
    <af:inputText value="#{bindings.DepartmentId.inputValue}"
    label="#{bindings.DepartmentId.hints.label}"
    required="#{bindings.DepartmentId.hints.mandatory}"
    columns="#{bindings.DepartmentId.hints.displayWidth}"
    maximumLength="#{bindings.DepartmentId.hints.precision}"
    shortDesc="#{bindings.DepartmentId.hints.tooltip}" id="it1">
    <f:validator binding="#{bindings.DepartmentId.validator}"/>
    <af:convertNumber groupingUsed="false" pattern="#{bindings.DepartmentId.format}"/>
    </af:inputText>
    <af:inputText value="#{bindings.DepartmentName.inputValue}"
    label="#{bindings.DepartmentName.hints.label}"
    required="#{bindings.DepartmentName.hints.mandatory}"
    columns="#{bindings.DepartmentName.hints.displayWidth}"
    maximumLength="#{bindings.DepartmentName.hints.precision}"
    shortDesc="#{bindings.DepartmentName.hints.tooltip}" id="it2">
    <f:validator binding="#{bindings.DepartmentName.validator}"/>
    </af:inputText>
    <af:inputText value="#{bindings.ManagerId.inputValue}" label="#{bindings.ManagerId.hints.label}"
    required="#{bindings.ManagerId.hints.mandatory}"
    columns="#{bindings.ManagerId.hints.displayWidth}"
    maximumLength="#{bindings.ManagerId.hints.precision}"
    shortDesc="#{bindings.ManagerId.hints.tooltip}" id="it3">
    <f:validator binding="#{bindings.ManagerId.validator}"/>
    <af:convertNumber groupingUsed="false" pattern="#{bindings.ManagerId.format}"/>
    </af:inputText>
    <af:inputText value="#{bindings.LocationId.inputValue}"
    label="#{bindings.LocationId.hints.label}"
    required="#{bindings.LocationId.hints.mandatory}"
    columns="#{bindings.LocationId.hints.displayWidth}"
    maximumLength="#{bindings.LocationId.hints.precision}"
    shortDesc="#{bindings.LocationId.hints.tooltip}" id="it4">
    <f:validator binding="#{bindings.LocationId.validator}"/>
    <af:convertNumber groupingUsed="false" pattern="#{bindings.LocationId.format}"/>
    </af:inputText>
    </af:panelFormLayout>
    </af:dialog>
    </af:popup>
    </af:form>
    </af:document>
    <!--oracle-jdev-comment:preferred-managed-bean-name:CreateDepartmentPageHelper-->
    </f:view>
    BACKING BEAN CODE:
    package view;
    import javax.faces.context.FacesContext;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.share.ADFContext;
    import oracle.adf.view.rich.component.rich.RichPopup;
    import oracle.adf.view.rich.component.rich.data.RichTable;
    import oracle.adf.view.rich.context.AdfFacesContext;
    import oracle.adf.view.rich.event.DialogEvent;
    import oracle.adf.view.rich.event.DialogEvent.Outcome;
    import oracle.adf.view.rich.render.ClientEvent;
    import oracle.binding.BindingContainer;
    import oracle.binding.OperationBinding;
    import oracle.adf.view.rich.util.ResetUtils;
    import oracle.jbo.Row;
    import oracle.jbo.server.ViewRowImpl;
    public class CreateDepartmentPageHelper {
    //old "current row" value is saved in view scope in case the rw creation is
    //cancelled, in which case this row needs to become current again
    final String OLD_CURR_KEY_VIEWSCOPE_ATTR = "__oldCurrentRowKey__";
    private RichPopup popup;
    private RichTable departmentsTable;
    public CreateDepartmentPageHelper() {
    public void setPopup(RichPopup popup) {
    this.popup = popup;
    public RichPopup getPopup() {
    return popup;
    //system generated method when you create a managed bean method for
    //a component that has an ADF binding referenced in its action listener
    public BindingContainer getBindings() {
    return BindingContext.getCurrent().getCurrentBindingsEntry();
    //command action that create a new row in teh departments table and then
    //opens an edit dialog for commit/cancel
    public String cb1_action() {
    BindingContainer bindings = getBindings();
    //get current row and save its rowKey in view scope for later use
    DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("allDepartmentsIterator");
    Row oldCcurrentRow = dciter.getCurrentRow();
    //ADFContext is a convenient way to access all kinds of memory scopes.
    //If you like to be persistent in yur ADF coding then this is what you
    //want to use
    ADFContext adfCtx = ADFContext.getCurrent();
    adfCtx.getViewScope().put(OLD_CURR_KEY_VIEWSCOPE_ATTR,
    oldCcurrentRow.getKey().toStringFormat(true));
    //perform row create
    OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    //access the popup dialog and bring it up. The reference is through a
    //JSF component binding reference using the popup "binding" property
    RichPopup popup = this.getPopup();
    RichPopup.PopupHints hints = new RichPopup.PopupHints();
    //empty hints renders dialog in center of screen
    popup.show(hints);
    return null;
    public void onDialogAction(DialogEvent dialogEvent) {
    Outcome outcome = dialogEvent.getOutcome();
    //the dialog event only propagates yes, no, ok actions to the
    //server. The cancel outcome is only available on the browser
    //client. If there is a need to handle the cancel even then you
    //need to use a clientListener and JavaScript as we do on this
    //example
    if(outcome == Outcome.ok){
    //commit
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("Commit");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    //handle errors if any
    return;
    AdfFacesContext.getCurrentInstance().addPartialTarget(this.getDepartmentsTable());
    public void setDepartmentsTable(RichTable departmentsTable) {
    this.departmentsTable = departmentsTable;
    public RichTable getDepartmentsTable() {
    return departmentsTable;
    //method that is called from the serverListener on the client. The server
    //listener is used to queue a custom event and pass information from the
    //client to the server using JavaScript. Its actually doing this Ajax thing
    //that everyone wants to do using the XmlHTTPRequest object
    public void onDialogCancel(ClientEvent clientEvent) {
    BindingContainer bindings = getBindings();
    RichPopup popup = this.getPopup();
    popup.hide();
    ResetUtils.reset(clientEvent.getComponent());
    //the cancel operation is executed with immediate=true to bypass the
    //model update. Therefore we manually deletethe new row from the iterator
    DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("allDepartmentsIterator");
    dciter.removeCurrentRow();
    //set current row back to original row
    ADFContext adfCtx = ADFContext.getCurrent();
    String oldCurrentRowKey = (String) adfCtx.getViewScope().get(OLD_CURR_KEY_VIEWSCOPE_ATTR);
    dciter.setCurrentRowWithKey(oldCurrentRowKey);
    AdfFacesContext.getCurrentInstance().addPartialTarget(this.getDepartmentsTable());
    FacesContext fctx = FacesContext.getCurrentInstance();
    //we don't want to continue with the remainder of the lifecycle and
    //thus skip the rest
    fctx.renderResponse();
    }

    Hi Frank,
    Thanks for the reply. I retested with a .jspx file just to confirm my results. I've tried Facelets as well without success. Results for .jspx are as follows:
    1. If the add button PartialSubmit property is set to true, and the popup's ContentDelivery=lazyUncached, ChildCreation=deferred, and AutoCancel=disabled, then:
    the popup appears with error messages outlining the required fields
    2. If the add button PartialSubmit Property is set to false and popup properties are the same as above then the popup opens as expected. However, if an attempt is made to insert a duplicate record - using departments table as an example, trying to create a row with an existing department - then a red box appears around the DepartmentId cell in the popup without any error message. If I press OK again, then the duplicate key error message appears as expected.

  • WP8 - Different b/w Lock button and windows button pressed

    Hello,
    I need to differentiate the below scenarios:
    1. Press Lock, then unlock button  and open the application
    2. Press windows button and search for application from list of apps and open it
    I need to handle the scenarios differently, Can you please let me know how exactly we can differentiate above scenarios?
    I thought of handing in App.xaml.cs file as below:
    1. Press Lock, then unlock button  and open the application  --> e.NavigationMode == NavigationMode.Back
    2. Press windows button and search for application from list of apps and open it   --> e.NavigationMode == NavigationMode.Reset
    but sometimes, after lock the device, when the device is idle for more time and unlock it, e.NavigationMode == NavigationMode.Reset is called in 1. scenario also:(
    Please suggest how to solve the problem.
    Thanks,
    Navya 

    When you set a password lock on your Windows Phone, it can help you avoid accidentally making calls at inopportune moments to friends, family members or colleagues. (To learn more, take a look at
    Lock screen FAQ.) But just because your phone is locked doesn't mean it's out of commission. There are lots of things it can still do.

  • Push button to Open a container in Adobe form

    Hi all,,
    I placed a Button on Adode form, but when I click on theat button, I shold get a pop-up window. How can I get that.
    I'm not using Webdynpro application. Only the normal adobeform executed by the Report.
    I'm now to the Adobe form. What code should we write in Script Editor.
    Thank you!
    Venkata

    Hi,
    I'm workign on Generic Object Services.
    When I click the button on Adobe form, it should open a window contianing the text or links.
    I kept button on Adobe form, it displays but behaves like an immage.
    How to Activate or work with button.
    What should I write in Script Editor to act like a button and open a window.

  • Create script for a button to open a PDF using AS3

    I created a Flash movie in AS3 on the mac. I have several
    navigation buttons, I want to be able to click on a button and open
    a PDF. The finished movie will be an executable for the pc. I also
    want to do the same for a .swf file.

    Well, I think I got it working. The code I came up with seems a lot more simple than what I was experimenting with. I am pretty sure I did something earlier that was similar to this code but the current swf stayed with the player when the new one loaded, I am pretty sure the old swf is hiding underneath the new one but after some testing, the actual presentation is working as intended so I am waving the AS3 white flag and am accepting how this functions in its present state. I nearly gave myself a heart attack trying to get this simple function to work
    Anyway, heres my "final" code. If anyone sees something that should be adjusted, please let me know.
    play_iv.addEventListener(MouseEvent.CLICK, loadmain);
    function loadmain(event:MouseEvent):void {
                var prevu_english:Loader = new Loader();
                prevu_english.load(new URLRequest("assets/PreVu - English.swf"));
                addChild(prevu_english);
    Also, Thankyou Ned. You pointed me in the right direction. If I didn't keep looking at the loader class, I probably would have spent days doing trial and error until I got somewhere.

  • Open and Close Popup With Javascript

    Using Apex 3.2
    I have probably done this loads of times in my old job, but do not have access to the code and today I just can't get it to work properly.
    I have opened a pop up window with javascript
    Now I need to close it and refresh the calling page, but only if it passes the validation on the popup.
    I have a hidden item on my pop up called P7_FLAG.
    I have a page process after validation that sets P7_FLAG to (only set to 1, if passes validation).
    I also have a SUBMIT button.
    So once I click my SUBMIT button the page should look at the validations, if ok, set P7_FLAG to 1, then close the popup and refresh the calling page.
    My current javascript look like this
    <script type="text/javascript">
    function saveChanges(){
    doSubmit('SUBMIT');
    var test = $x('P7_FLAG').value;
    if(test == '1')
    window.close();
    window.opener.doSubmit('REFRESH');
    </script>On my button
    javascript:saveChanges();The problem is that I need to click the SUBMIT button twice.
    First time it sets P7_FLAG
    Second time it closes page and refreshes.
    I have probably made some basic error, but today I cannot see it.
    Cheers
    Gus
    Edited by: Gus C on May 10, 2012 12:48 AM

    <script type="text/javascript">
    function saveChanges(){
    doSubmit('SUBMIT');
    var test = $x('P7_FLAG').value;
    if(test == '1')
    window.close();
    window.opener.doSubmit('REFRESH');
    </script>javascript does not wait for the current action to complete and then perform the next line.
    means in your function call
    doSubmit('SUBMIT');is triggered and it carry on's to next line that is
    $x('P7_FLAG').value;this will not be set because you are setting the value of P7_FLAG to 1 in plsql and trying to check in javascript, which will not work.
    what you need to do is amend your js function like below
    <script type="text/javascript">
    function saveChanges(){
    doSubmit('SUBMIT');
    </script>create a page branch to procedure and make it conditional to when P7_FLAG = 1
    and set the branch source to below
    htp.p('window.close();');
    htp.p('window.opener.doSubmit(''REFRESH'');');

Maybe you are looking for

  • Windows server 2008 r2 standard edition 64bit VPS

    Hello all, I am running a Windows 2008 r2 standard edition VPS and lately I am encountering crash issues.  After i checked the logs I found out the following events on System logs. Event id 41 Kernel-Power System Provider [ Name] Microsoft-Windows-Ke

  • Problem with BAPI_HU_CREATE

    Hi, I would create handling units. (Transaction HUP30). During the creation process, how recover the packaging material starting from base material, and pass it to BAPI_HU_CREATE? The VHUSUBSC_PROCESS_USERINPUT function module, recover the packaging

  • Datasource for trial balance

    Hi, I am on BW 7.4 and wated to know if I should use datasource 0FI_GL_10 or 0FI_GL_14 or 0FI_GL_4 to build a report on trial balance. Please let me know. Thanks, Sam

  • Crystal Reports 9: Page Header plus Page Footer is too large for the page.

    Hi, I have a report that has the following sections. GH1 GH2a GH2b - has a sub report GH2c - has another sub report GH3 GH4 GH5 details - suppressed GF5 - suppressed GF4 - suppressed GF3 - suppressed GF2 - suppressed GF1 - suppressed The report works

  • Reg:URL in 10g

    Hi, we are facing an issue with the URL. Let me explain the problem, we are invoking web.show_document('URL', '_blank') from forms 10g. In the URL being generated we are concatenating the servername within the URL. In Dev, the server name turns autom