Update select in parent window

Hi there
I have a window thats been opened through window.open(...). What I now want to do is to, form the new window update a select object in the first/parent window. I've tried do do this through this javascript:
var option = new Option("test","test");
opener.document.form1.selectbox.options[1] = option;But when it runs I get a error message: Server has thrown an exception
Does anyone know why this happens or have any other suggestion on my problem?
Thanks / Daniel

<!--- POPUP.CFM --->
<cfif NOT structkeyexists(form, 'color')>
<cfform action="popUp.cfm" method="post" name="form1">
<cfinput type="radio" name="color" value="red"
required="yes">Red
<cfinput type="radio" name="color" value="blue"
required="yes">Blue
<cfinput type="radio" name="color" value="green"
required="yes">Green
<br />
<cfinput type="submit" name="submit" value="submit">
</cfform>
<cfelse>
<script type="text/javascript">
updateColor(<cfoutput>'#form.color#'</cfoutput>);
</script>
</cfif>
<!--- MAIN PAGE --->
<!--- Add this js function to the HEAD section of the
page: --->
<script type="text/javascript">
updateColor = function(color){
document.getElementById('main').innerHTML = color;
ColdFusion.Window.hide('mywindow');
</script>
hth
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

Similar Messages

  • Update cfdiv in Parent Window from popup window

    I need help trying to update a cfdiv in the parent window
    from a popup window.
    The parent window displays a color (red by default)
    The popup gives you a radio selection which would let you
    select a different color.
    I need to have this submit button update the cfdiv called
    "main" in the parent window by lby displaying the corresponding
    color AND I want this window to hide.

    <!--- POPUP.CFM --->
    <cfif NOT structkeyexists(form, 'color')>
    <cfform action="popUp.cfm" method="post" name="form1">
    <cfinput type="radio" name="color" value="red"
    required="yes">Red
    <cfinput type="radio" name="color" value="blue"
    required="yes">Blue
    <cfinput type="radio" name="color" value="green"
    required="yes">Green
    <br />
    <cfinput type="submit" name="submit" value="submit">
    </cfform>
    <cfelse>
    <script type="text/javascript">
    updateColor(<cfoutput>'#form.color#'</cfoutput>);
    </script>
    </cfif>
    <!--- MAIN PAGE --->
    <!--- Add this js function to the HEAD section of the
    page: --->
    <script type="text/javascript">
    updateColor = function(color){
    document.getElementById('main').innerHTML = color;
    ColdFusion.Window.hide('mywindow');
    </script>
    hth
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

  • How to populate a Value in popup based on value selected in Parent window

    Hi Gurus,
    I have done a custumization to generate a PDF report for a given DocType and Document ID.
    I have 2 fields in xxxQuoteDevPG.xml (Parent Window) called DocType and Document Number.
    Doctype is dropdown list which has 2 values i.e. Sales Quote and Manual SOW Number and Document Number is a text field with search option.
    when i select the doctype as Sales Quote and search for docnumber , i will get a popup where i have "Search By" dropdown list in this i have 2 values i.e "Quote Number" and "Customer PO".
    When i select a Sales Quote as Doctype i need to populate Quote Number as defualt in Search by dropdown list.
    and When i select Manual SOW Number from parent window i need to defualt Customer PO in popup.
    Now it is always shows Quote Number as defualt one for the doctypes.
    Actually thr is only one controller atatched to xxxQuoteDevPG.xml and popup is a OA Region.
    Can somebody help me on this issue.
    Thanks,
    MMR

    This should be a custom java class containing that method.
    Try on java or jdbc forum - Java Database Connectivity (JDBC) , Java Programming

  • Safari 5.1.2 opens two of every window when selecting "Reopen all windows from last session" since the latest update.

    Since the latest Saffari update to 5.1.2, every time I close Safari and reopen, and select "Reopen all windows from last session," two of every window opens.  I must go through a long list under the 'Window' menu and select one of eac pair and close them.  What a hassle. 
    Has anyone experienced this as well, and is there a fix? 

    is there a fix?
    Disable Resume...
    How To Disable Lion's 'Resume' Feature - MacRumors.com

  • Refreshing parent window

    Hi
    My window is opening a pop up window which is itself a jsf, however when this pop up window get closed i need to refresh the parent window that loaded it (in example a compose mail window is loading a select contact window, the select contact window is updating a bean with the selected contact) how do i refresh the parent window with the selection from the popup jsf window?

    I guess not. Write it yourself or wait for somebody else to do it (MyFaces?).
    I should let somebody more knowledgeable than me answer, but I'll take a shot at what I think they might say (except they'd probably take the time to be much more diplomatic): the JSF RI you download from Sun is only supposed to be a starter kit. JSF is a specification, not a product. The specification includes some basic html behavior that you can be sure all conforming implementations will support. Furthermore, it's intended to be something foundational, not really an end-user product. The expectation is that vendors will proceed to develop wonderfulness using JSF as a basis.
    (You have a reminder set to check this thread every 3 days, don't you? :)
    John.

  • IPhoto will not load the iPhoto library.  When I select "show all windows" the library does appear but cannot open it.  I am on version 8.1.2 and using Maverick.

    iPhoto will not load the iPhoto library.  When I select "show all windows" the library does appear but cannot open it.  I am on version 8.1.2 and using Maverick.

    I was able to get it fixed. I had received some responses and they had me
    recreate the library I believe.  It's been a while so I cant remember
    exactly what I did. I have since upgraded to the latest i photo version and
    have had no problems with it.
    Brian
    On Friday, November 7, 2014, Apple Support Communities Updates <

  • Install BootCamp update 4.0 on Windows 7 x64 returns error

    Hello,
    I have a problem updating BootCamp software on Windows. Updating from 3.2 to 3.3 or 4.0, from ASU or from manual installation, returns this:
    https:// picasaweb.google.com/lh/photo/-w77Vf1cQrlarNb_LUz7fNct5nxxnOU3qWXwGpPvXwI?feat=directlink (spanish)
    Basically, it says that I'm using a network resource that is not available, and tell me to pick a "BootCamp64.msi" file
    If I set the file, it returns this:
    https://picasaweb.google.com/lh/photo/_tqfhSNKK1wBmojjR7kWy9ct5nxxnOU3qWXwGpPvXwI?feat=directlink (spanish)
    It says the file set is not valid msi for installing Boot Camp Services, and tell me to find a file called "BootCamp64.msi" on a folder ready to install Boot Camp Services
    This for 3.3 and 4.0 versions.
    In the log, it says...:
    Info: Found Boot Camp x64 version 3.2
    Info: BootCampUI failed to install 64 bit Boot Camp patch. The install returned 1603
    Info: BootCampUI is exiting. The install returned 1
    I know how to manually install the drivers, but what I want is update bootcamp.
    Details:
    SO W: Windows 7 x64 Updated
    SO OSX: Mac OSX 10.7.3 "Lion" Updated
    Mac: iMac 21.5" (Late 2010 I think) 500GB, 8GB RAM.
    This problem appeared from the first day I installed Windows 7.
    I also have a log file from de msi generated with the command "/l*v c:\log.txt",it doesn't make me happy to make it public, but I've attached.
    Thanks,
    Alberto Salazar
    P.S. : I'm spanish, so my english might be difficult to understant. Sorry.

    Uninstall Boot Camp
    Run Microsoft Installer Cleanup Utility
    Install 4.01
    Sometimes you update by first removing the old version
    You may want to run CCleaner as well.
    CCleaner Optimization Cleaning
    Start: run
    Type: %TEMP%
    Select All - send to Recycle Bin
    Those two should be done as regular household cleaning maintenance
    http://technet.microsoft.com/en-us/magazine/2008.08.utilityspotlight.aspx
    The Windows Installer CleanUp Utility is designed to allow you to safely remove Windows Installer settings from your computer in the event of a problem. Although the Windows Installer is designed to be very robust, it is possible for Windows Installer to become damaged if:
    Your computer's registry becomes corrupted
    You or someone else inadvertently changes a registry setting used by the Windows Installer, resulting in a problem
    The installation of a program that uses Windows Installer (for example, Microsoft Office 2000) is interrupted
    There are multiple instances of Setup running simultaneously, or an instance of Setup is "blocked"
    http://download.cnet.com/Microsoft-Windows-Installer-Cleanup-Utility/3000-18512_ 4-15905.html
    FIXIT: The new utility that replaced Windows Installer Cleanup:
    http://support.microsoft.com/kb/2438651/

  • How to re-show a dialog with the parent window

    I am writing an Menu drivern application:
    -- A JCMDIPane is put in the JFrame.
    -- Multiple JCMDIFrames are added to the JCMDIPane via menu selecting events
    -- Each JCMDIFrame (call it parent) may pop up a Dialog window (child) (Thes dialogs are modal)
    Here is my problem:
    When you switch away from this Java application to other applications (reading mauls, editing word documents, surfing web), of course, the Java program is hiding behind these applications and only left a Icon on your taskbar. The problem is that when switch back from other application to this Java program, However, it only shows the parent window (the JCMDIFrame ) and the child (the dialog) is behind. You have to using Alt_Tab to get the focus on the child and show it.
    My question is:
    Is there any way can we show the Dialog window is on the parent window (as it originally shown)?
    I have tried to overwriting the paint method of JCMDIFrame :
    public void paint(Graphics g)
    super.paint(g);
    if(child != null && child.isShowing())
    child.setVisible(true);
    This works on other applications but not on the Internet Explore (It always show the dialog).
    Anybody can give me a clue?
    Thanks!

    When you pop up a dialog, if you use the constructor:
    Dialog(Frame owner, boolean modal);
    and pass it an instance of the parent frame (and set "modal" to "true"), then it is my understanding that it should always appear in front of the parent - are you sure this is what you are doing?
    Double check by doing myDialog.getOwner() and make sure it's not null.

  • Will automatic update select 'Adobe Reader X' after support ends for 'Adobe Reader 9.5.5' on 6/23?

      After the recent update for ‘Adobe Reader 9.5.5’ the end of support for this version is June 23, 2013. This is installed on an edition of ‘Windows Vista Home Premium Service Pack 2’. System type: 32-bit Operating System.

      Probably is the best way to go if end of support for ‘Adobe Reader 9.5.5’ is June 23, 2013. Does automatic update select the latest version of ‘Adobe Reader X’?

  • *.eml Time Stamp - Select File in Windows Explorer Changes the Modified Date

    The Windows Live Mail *.eml files time stamp is getting changed to the current date when the file is selected in the Windows Explorer! I save backup copies of important E-mails to folders on the Hard Drive and then synchronize them with the same folders on other LAN Hard Drives for backup archives. When these E-mail files are selected or opened from the Windows Explorer in the Windows 7 OPS the Modified Date Time Stamp is changed to the current date automatically! This action creates a real problem when doing later synchronizations of all of the folders! The date will not be the original date of the E-mail and the original file will be over copied with the file with the newest date stamp. I stopped Indexing on the *.eml files and that stopped the time stamp change when overcopy synchronization, but if the file is selected during a viewing in Windows Explorer then the Time Stamp is updated to the current date again! A solution to this problem would be greatly appreciated if anybody knows of one. Thanks - - - Shorto

    The Date and Timestamp changing issue in Windows 7 has a two part fix!
    1. Disable the Indexing of the *.eml file type in the Indexing Options located by Clicking on "Control Panel" -  "Indexing Options" - Advanced Button - File Types Tab - scroll down to the .eml file type and uncheck the Box then click OK to finish, so
    that the Email type of files won't be Indexed.
    2. Delete the Registry Entry listed below, be sure to Export and Save the original Key so it could be Restored if something goes wrong!  \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PropertySystem\PropertyHandlers
     and Delete the .eml entry
    That should fix the problem with the changing Date/Timestamp of Email Files. For more information read CarlS's WindowsSeven Fourm thread where I also have more input:
     http://www.sevenforums.com/browsers-mail/35334-eml-files-timestamps-updated-constantly.html
    This should give you a better understanding on the problem and the Fix. - - - Shorto

  • Sending TABLE data in child window to parent window

    My question is as follows:
    I have a JSP with a parent window, which opens a pop-up window.
    In the pop-window there is a <TABLE> tag defined with a number
    of <TD> definitions referencing columns of data from a database table.
    There is also a 'select' button next to each row displayed.
    On pressing the 'select' button I want the data to go back to the fields
    in the parent window.
    I am successfully displaying the data in the pop-up window
    I have used the DOM model in the past and for other elements within this JSP - i.e. drop down lists, sending data back to the parent window works fine, but I'm not sure of the syntax for referencing the TABLE items within the DOM model to send back to the parent window.
    Any help on this would be very much appreciated.
    Many Thanks
    Chris

    Well I've looked and I can't find anything wrong with it, but then I wrote it. I've included it as follows:
    <%@page contentType="text/html"%>
    <html>
    <head>
    <SCRIPT language=JavaScript>
    function send_back(eventHandle)
    if (opener == null) {
    alert("\n Calling Window is no longer present. Will now close this window\n");
    window.close();
    else
    if (eventHandle == "returnRow") {
    <%-- Significant code below with the first statement referencing--%>
    form name and item name and its value --%>
    opener.document.produceTrans.studentID.value =
    document.personLOV.personID.value;
    <%-- statement below works so no that variable is correct-value --%>
    <%-- part is wrong --%>
    <%-- opener.document.produceTrans.studentID.value = "290000"; --%>
    </SCRIPT>
    <title>Person List
    </title>
    </head>
    <%-- If the focus switches to the calling window this called window is closed
    <BODY onBlur="window.close()"> --%>
    <BODY>
    <jsp:useBean id="personV" scope= "request" class="mypackage.PersonBean"/>
    <jsp:setProperty name="personV" property="personName" />
    <%-- Significant code below 1 with form name = personLOV --%>
    <form name=personLOV METHOD="POST" action="transcript-control-servlet?Action=personList">
    <TABLE >
    <tr>
    <td><input type='text' size=32 name="personName"> </td>
    <td>
    <input type="submit" name=personSearch value="Find Person">
    </td>
    </tr>
    </TABLE>
    <br>
    <div style="width:480px; height:170px; overflow: auto;">
    <TABLE border="1" cellspacing="1">
    <tr>
    <%
    Vector personVector = new Vector();
    try {
    personVector = (Vector)request.getAttribute("listPerson");
    for (Enumeration e = personVector.elements();
    e.hasMoreElements();) {
    personV = (mypackage.PersonBean)e.nextElement();
    //Significant code below 2 with persID setup
    String persID = personV.getPersonID();
    %>
    <tr>
    <%-- Significant code below 3 with hidden field set to persID --%>
    <%-- and name=personID --%>
    <td><input type="hidden" name=personID value='<%=persID%>'></td>
    </tr>
    <tr>
    <td><input type="button" name=SelectPerson value="Select"
    onClick=send_back("returnRow")> </td>
    <td><%= personV.getPersonID() %></td>
    <td><%= personV.getPersonLastName() %></td>
    <td><%= personV.getPersonFirstName() %></td>
    <td><%= personV.getPersonBirthDate() %></td>
    </tr>
    <% } }
    catch (NullPointerException ce) {
    System.out.println("No records in list ");
    %>
    It is very straightforward and I believe I am referencing the correct form name/item name in the correct manner.
    If I'm not then please tell me why not and how to fix it.
    Thanks
    Chris

  • How to parse parameter from child window to parent window in JSP

    I have two JSP i.e. course1.jsp and course2.jsp. I would want to find out how I could parse the parameter/value from child window to the parent window when the child window get closed.
    What I am trying to do is actually a file upload process. The child windows will open for user to upload the file, and when close, the file name will be parse into the parent form for database update. Is this something possible at all? or is there any other better approaches.
    Thank you.
    These are the two files:
    --------course1.jsp ------------
    Attach File <p>
    <FORM name="courseForm" action="course2.jsp" method="post" enctype="multipart/form-data">
    <TABLE cellSpacing=1 cellPadding=3 border=0 WIDTH=500>
    <TR >
    <TD>
    <input type="text" NAME="f_file_name" size="30" VALUE="this value should be taken from child windows">
    get file name
    <p>
         <INPUT class="buttons" TYPE="submit" NAME="submit" VALUE="Submit">
    </TD>
    </TR>
    </TABLE>
    </FORM>
    ---- course2.jsp -------
    <%
    String filename = "this is the string needs to go back to parent windows when I click on close";
    %>
    <p>
    close

    In course2.jsp, you have to write some javascript code to reload the parent window document to reload the document with an added parameter. But, instead of doing this, you can also do simple thing; in course2.jsp, you can reference course1.jsp controls via javascript object, "parent". On closing event of course2, you can write:
    parent.courseForm.f_file_name.text = '<%=filename%>' ;
    window.close() ;
    But for this to work, you must open your course2.jsp document thru window.open() function instead of simple hyper link (as you did thru ).
    So, modify the hyperlink line like below:
    get file name
    Hope it helps.

  • Window.opener  property from child window to parent window

    Hi
    When communicating between the child (popup) window to the parent window works fine as long as we pass the static reference to the window.opener
    Example :
    Main Page
    form name = staticform
    input name = col1
    Popup Page
    javascript :
    window.opener.staticform.col1.value = some value
    How can I use a dynamic reference for the staticform.col1 in the window.opener property to post the value back to the parent window ?
    thanks for the help
    sarma

    Actually, I think tolmank's would work... I've done basically the same thing before, but more like this (if it's generic, it's a good idea to have checks for the things being in existance). This is something I used in a generic color chooser I wrote in Javascript. Had multiple fields in one form using it for selecting different foreground/background colors.
    <%
    String form = request.getParameter("form");
    String fgfield = request.getParameter("fgfield");
    String bgfield = request.getParameter("bgfield");
    %>
    vfnSet = function() {
       if(typeof(window.opener) == 'undefined' || window.opener == null) {
          return;
       if(typeof(window.opener.document.forms['<%= form %>']) == 'undefined') {
          return;
       var oForm = window.opener.document.forms['<%= form %>'];
       if(typeof(oForm.<%= fgfield %>) == 'undefined') {
          return;
       if(typeof(oForm.<%= bgfield %>) == 'undefined') {
          return;
       oForm.<%= fgfield %>.value = document.forms['colorform'].foreground.value;
       oForm.<%= bgfield %>.value = document.forms['colorform'].background.value;
    }

  • Problem in Passing the value from child window to Parent window.

    Hi Frenz,
    I have a requirement like this. i have to pass a value from child window to parent window to one test field. That text field is not a normal text field.
    It was created like the following as SQL query.
    select
    ''LNo,
    apex_item.text(25,'',0,15,
    'style="width:100px;" onblur="javascript:showUpsell(this.value);" onkeypress="javascript:validateKeyPress(event,this.value,this.id);" onkeyup="javascript:this.value=this.value.toUpperCase();" id="P37_ITEMNO"') ItemNo
    Now i want to pass a value to the Item no from child window.
    i wrote the java script like this,
    opener.document.forms[0].f25.value="100";
    It was not working..Any suggestions for that..
    Thanks in advance

    Dear Baaju,
    How do you redirect your control from Child to Parent window.
    If you use a button to do this, then you can set this value in the branching of page.
    Rana

  • Close popup window and refresh the parent window

    Hello,
    I have a button in a normal report, when clicked opens up an popup window which is a form containing some items and here in this form (i have some editable text items) I make some changes and click on the apply changes button -- this should update the form, close the popup window and should refresh the parent window.
    can anyone please help me out with this issue.
    Thanks,
    Orton

    you have your popup window. When they apply the changes you want it to close the window, right?
    Modify the button (save, apply changes) and give it url redirect to the custom function you create (See below): javascript:saveChanges();
    in the page header, add a new function:
    <script type="text/javascript">
    function saveChanges(){
         doSubmit('SAVE');//this is the line to save the current form on the popup window. (This assumes SAVE is the request value that should udpate the db)
         window.close();//close the popup window
         window.opener.doSubmit('REFRESH');//call doSubmit function on the parent window to cause the page to refresh.
    </script>

Maybe you are looking for

  • Saving a Form created in Adobe Acrobat 9 Pro

    We create forms for the company to use with Adobe Acrobat 9 Pro, but because others do not have Acrobat 9 Pro they can not save the document after they have filled out the form.  This is causing a big issue for us.  Does anyone know a way that we can

  • Special characters in passwords

    Where can I get documentation for restrictions on passwords. Like what special characters can be used in passwords? Maximum length etc?

  • HT1430 How do you power off a i Phone in Assistive Touch?

    I have to use Assistive Touch on my phone because the power button does not work, how do I power off the phone completely when I use Assistive Touch?

  • Oracle ADF Faces

    I want to use Oracle ADF Faces in the following environment. 1) IDE - eclipse, exadel studio 3.0.5 2) Container - Tomcat 5.0.9 3) Sun RI Please tell how to use adf with above environment. I need configuration details only.

  • Difference between mvt 122 & mvt 161

    Hi gurus, is there any difference between mvt 122 and mvt 161, both are to return the goods to vendor, will reward points rgds