Reading child window contents using Javascript

Hi Friends,
is it possibel to read the contents of the child window opened from a javascript.for example am opening a window using Window.open function in javascript, after opening the window can i read the contents ?If so how can anyone help in this.
Thanks
Vishy

Am sorry , but there are courteous ways to say this.
Anywya never mind .SOrry if i have taken more traffic
with this irrelevant questionI'm not trying to be rude. I'm just suggesting that you'll get better replies on a JavaScript forum.

Similar Messages

  • Reading file content using Javascript

    Hi Friends,
    is it possibel to read the contents of the child window opened from a javascript.for example am opening a window using Window.open function in javascript, after opening the window can i read the contents ?If so how can anyone help in this.
    Thanks
    Vishy

    Below is the code of my normal java program which works fine.
    try {
    // File destFile = new File("./SourceFiles/savedFile.txt");
    File destFile = new File("./SourceFiles/", "savedFile.txt");
    BufferedWriter writer = new BufferedWriter(new FileWriter(destFile));
    writer.write("TESTing File Save");
    writer.flush();
    System.out.println("SAVED!!");
    } catch ( IOException e ) {
    e.printStackTrace();
    Structure of this project is
    Samples
    |SaveSample
    |SaveSample.java
    |SourceFiles
    |savedFile.txt
    I have implemented similar code in my servlet too. But this doesnt save the content to the HTML file.
    protected void doPost(HttpServletRequest request,
                   HttpServletResponse response) throws ServletException, IOException {
              action = request.getParameter("action");
              try {
    File destFile = new File("./SourceFiles/", "savedFile.html");
    BufferedWriter writer = new BufferedWriter(new FileWriter(destFile));
    writer.write(action);
    writer.flush();
    System.out.println("SAVED!!");
    } catch ( IOException e ) {
    e.printStackTrace();
    Im getting FileNotFound Exception
    java.io.FileNotFoundException: .\SourceFiles\savedFile.html (The system cannot find the path specified)
         at java.io.FileOutputStream.open(Native Method)
         at java.io.FileOutputStream.<init>(Unknown Source)
         at java.io.FileOutputStream.<init>(Unknown Source)
         at java.io.FileWriter.<init>(Unknown Source)
         at savepackage.SaveContent.doPost(SaveContent.java:81)
    Edited by: 849224 on Apr 5, 2011 4:17 AM

  • Parent child window functionality using CFM

    In .cfm page I am trying to implement the following
    functionality
    I got a parent window contains a button.
    On button click a child window should get open.
    This child Window should get embed in that parent window
    (like MDI application)
    1)i.e While minimizing the parent window this child window
    should also get minimized
    2)While closing the parent window this child window should
    also get closed
    3) We should also be able to close the child window alone.
    4) If you double click on the title bar of the child window
    it should get maximized
    5) Again double click on the title bar of the child window it
    should get minimized.
    I tried with <embed> tag but it seems its for audio ,
    flash kind files.
    If we can use <embed> tag means whats should be the
    value of the "Type" attribute.
    waiting for your valuable information

    Window handlers and controls are generally a function of the
    browser and not really manipulatable using ColdFusion, as it runs
    on server-side only, not client-side. JavaScript would be more the
    thing to play with in this regard, although I don't think there is
    an "onClose" event handler.
    HOWEVER!
    All browsers have a security feature that prevents pop-up
    child windows from "hijacking" their parents window behaviors,
    including resizing, moving, changing the toolbars, closing, etc.
    This security feature cannot be bypassed, and is an integral
    hard-coded aspect of all modern browsers. I suspect that what you
    are looking to do may be impossible due to this one fact, unless
    someone knows a bypass.

  • Retrieving and Resetting textEdit Content Using JavaScript

    I need to retrieve the content within a textEdit box using JavaScript, and then append a String to that content, and re-enter that content as the inner content of a textEdit box.  Does anyone know how to do this? 
    I tried using jsObjectNeeded for textEdit, but it is an invalid parameter for that object.  I also tried grabbing the ID in a round-about way in JavaScript using _1texteditor or _1htmlbeditor, but I get an "Object Expected" error everytime.
    Here is the item I am working with, and within my JS method, I need to grab the text inside, append a string to it, and reset that new content as the text within the edit box.
    <hbj:textEdit id="summaryBox"
       text="Add summary here."
       wrapping="SOFT"
       tooltip="Add summary here."
       rows="5"
       cols="70">
    This is the content inside the box.
    </hbj:textEdit>
    Thanks in advance for your help...

    Thank you for your help, guys, but neither suggestion solved my problem and I solved it on my own.  You have to find the parameter ID through a line of Java, like Damian had mentioned about an ID, but I was looking for the value within the textEdit, not the ID. 
    In the JavaScript method, you set a variable to the Java variable, which found the parameter ID.
    Then, using that JS variable, you do:
    var blah = <%=javaParameterId%>;
    var funcName = htmlb_formid+"_getHtmlbElementId";
    func = window[funcName];
    var textEditField = eval(htmlb_formid + "." + blah);
    var wordsWithTexEdit = textEditField.value;
    Thanks anyways...

  • Opening new window without using javascript..

    Hi,
    This is the second time iam posting this question. I didnt get satisfactory answer to my previous post..
    Is there any possibility of displaying a new window on button click using only JSF and without using javascript? if yes please tell me how to do..
    Thanks...

    Yes, with target="_blank" in a link or a form.Thanks for ur valuable suggestion. I changed the button to link.
    Its working fine now without JavaScript.
    Now i got another requirement. When user select some items and press a button in the new popup window, the window must close on button click and the parent window must refresh. This must also be done without using JavaScript.
    Is this possible? Please give me an idea to do this.
    Thanks.

  • Read-Only Text Field Using JavaScript Code

    I'd like to make a text field read-only by using JavaScript and also having IF & ELSE statements.
    I want it to be like this:
    if the answer from the dropdown menu is YES, then the text field is read only but if the answer is NO then the text field is fillable.
    Thanks in advance

    Use this code as the custom validation script of the drop-down in question:
    this.getField("Text1").readonly = (event.value=="Yes");

  • Reading word doc contents using java

    hi
    can u tell me how to read the word doc contents using java and print it
    sameer

    HDF (Horrible Document Format)
    HDF is our port of the Microsoft Word 97 file format to pure Java. It supports read and write capability. Please see the HDF project page for more information. This component is in the early stages of design. Jump in!
    LOL :)

  • Reading a windows file using UTL_FILE with database on linux

    Database: 9.2 on RH AS 2.1 Linux
    I have an application which is running on a windows PC which reads the files on different PC's on the windows network and processes the data and deletes the files. I am thinking of moving the application to the database to reduce a point of failure for our application.
    Has any one tried using UTL_FILE to access the files on the Windows Network using SAMBA ??? Are there any limitations in Oracle on Linux with regards to accessing Samba Mounts' ??
    Thanks in advance
    Purush

    Purush, you should really ask this question in the Database Forums instead of here in the Forms Forum.
    Regards,
    Martin Malmstrom

  • Reading Grid/Table contents using ECATT

    Need to retrive the SAP table/grid column or all columns contents using SECATT, please provide the solution.
    Thanks in ADVANCE.

    hi,
    eCATT Links
    From SAP Help
    http://help.sap.com/saphelp_nw04/helpdata/en/1b/e81c3b84e65e7be10000000a11402f/frameset.htm
    From SAP Service Marketplace
    https://websmp204.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_OBJECT=011000358700003012112003E
    THANKS,
    sendil

  • How to hide table with empty content using Javascript?

    Hello!
    I'm using Adobe LiveCylce Desinger integrated in SAP. I have a task to hide a database-table, if the table empty is.
    Normmaly we can do following to check, whether the content empty is.
    if (this.REMARK_TEXT.rawValue == null )
    this.presence = "hidden";
    else
    this.presence = "visible";
    The question is, how to check in Javascript, if a table empty is.
    Many thanks in advance!
    regards
    longholiday

    could try something like this:
    function showOrHideTable(table){
         var isVisible = false;
        // gets the count of instance managers, event_initialize and row objects
        var rowCount = table.nodes.length;
        for(var i=0; i<rowCount; i++)
            //get the class name
            var myTestNode = table.nodes.item(i).className;
            //ignores the instance managers and event_init
            if(myTestNode == "subform")
                var innerCells = table.nodes.item(i).nodes;
                for(var j=0; j<innerCells.length; j++){
                    //ignores non-input boxes
                    if(innerCells.item(j).className == "field")
                        //check value
                        if(innerCells.item(j).rawValue != ""))
                            isVisible = true;
                        else
                            //hide the row
                            table.nodes.item(i).presence = "hidden";
        //if any row has a value specified
        if(isVisible)
            table.presence = "visible";
        //no value specified
        else
            table.presence = "hidden";

  • Read Excel sheet contents using java/javabeans

    I want to read the contents of an MS Excel file from java, is it possible using JavaBeans-ActiveX bridge or by any other java technologies, if possible, how ?

    I want to read the contents of an MS Excel file from
    java, is it possible using JavaBeans-ActiveX bridge or
    by any other java technologies, if possible, how ?Bridge2Java from IBM Alphaworks will do the trick for you.
    You can get it from here:
    http://www.alphaworks.ibm.com/aw.nsf/techs/bridge2java
    Using it, you can do things like the following (taken and abbreviated from the samples provided with the package):
    import Excel.*;
    public class QuickExcel
        public static void main(java.lang.String[] args) {
            Application app;
            Workbooks wbs;
            Workbook wb;
            Worksheet sheet;
            Range rangeA1, rangeA2;
            try
                com.ibm.bridge2java.OleEnvironment.Initialize();
                app = new Application(); // Excel.Application !!! :-)
                app.set_Visible(true);
                wbs = app.get_Workbooks();
                wb = wbs.Add();
                sheet = new Worksheet(wb.get_ActiveSheet());
                rangeA1 = sheet.get_Range("A1");
                String out = new String("This is a test");
                rangeA1.set_Value(out);
                // Wait five seconds
                Thread.sleep(5000);
                // Close the workbook without saving
                wb.Close(new Boolean("false"));
                app.Quit();
            } catch (com.ibm.bridge2java.ComException e)
                System.out.println( "COM Exception:" );
                System.out.println( Long.toHexString((e.getHResult())) );
                System.out.println( e.getMessage() );
            } catch (Exception e)
                System.out.println("message: " + e.getMessage());
            } finally
                app = null;
                com.ibm.bridge2java.OleEnvironment.UnInitialize();
    }

  • Extracting/Setting PDF Table contents using javascript

    Hello,
    Can you experts please let me know the following?
    1. Is there a way to extract PDF table contents?
    2. Can I set the row value via java script?
    Bottom line is I need to implement editable table in PDF. What are the ways I can achieve this feat?
    Thanking you in advance!
    Best Regards

    Hi PDL,
    I am actually writing a piece (C++) of code that generates Acroform currently. It is still in the primitive stage, just provided support only for text fields, choice fields and buttons.
    As I mentioned above, I have a requirement to generate a editable table...
    Sure I can provide the PDF(acroform) that is generated by the code.
    But how can I send the file to you? Can you share your email-Id? Or can I paste the content of the output here ?
    %PDF-1.5
    %%âãÏÓ
    1 0 obj
    <<
    /Pages 2 0 R
    /AcroForm 6 0 R
    /Type /Catalog
    >>
    endobj
    6 0 obj
    <<
    /CO []
    /Fields [ 7 0 R 9 0 R 10 0 R 11 0 R ]
    /NeedAppearances true
    >>
    endobj
    2 0 obj
    <<
    /Type /Pages
    /Count 1
    /Resources
    <<
    /ProcSet 3 0 R
    >>
    /Rotate 0
    /Kids [4 0 R ]
    >>
    endobj
    7 0 obj
    <<
    /A 8 0 R
    /BS <</W 1 /S /S>>
    /DA (/Helv 12.00 Tf 0.00 0.00 0.00 rg 0 G)
    /DR
    <<
    /Font <</Helv 14 0 R >>
    >>
    /F 4
    /FT /Btn
    /Ff 65536
    /H /P
    /MK
    <<
    /BC[0.87 0.83 0.55]
    /BG[1.00 0.94 0.55]
    /CA(PDF Button)
    >>
    /P 4 0 R
    /Rect [300.00 690.00 400.00 710.00]
    /Subtype /Widget
    /T (Button)
    /TU (PDF Button)
    /Type /Annot
    >>
    endobj
    8 0 obj
    <<
    /S /JavaScript
    /JS (if \(app.viewerVersion>=5\) {app.alert\("I-PDF 0.1 DEMO", 1\);})
    >>
    endobj
    9 0 obj
    <<
    /BS <</W 1 /S /S>>
    /DA (/Helv 12.00 Tf 0.00 0.00 0.00 rg 0 G)
    /DR
    <<
    /Font <</Helv 12 0 R >>
    >>
    /F 4
    /FT /Tx
    /Ff 12582912
    /H /P
    /MK
    <<
    /BC[0.00 0.00 0.00]
    /BG[1.00 1.00 1.00]
    >>
    /MaxLen 45
    /P 4 0 R
    /Rect [200.00 750.00 400.00 770.00]
    /Subtype /Widget
    /T (Text Field1)
    /Type /Annot
    >>
    endobj
    10 0 obj
    <<
    /BS <</W 1 /S /S>>
    /DA (/Helv 12.00 Tf 0.00 0.00 0.00 rg 0 G)
    /DR
    <<
    /Font <</Helv 13 0 R >>
    >>
    /F 4
    /FT /Tx
    /Ff 12591104
    /H /P
    /MK
    <<
    /BC[0.00 0.00 0.00]
    /BG[1.00 1.00 1.00]
    >>
    /MaxLen 15
    /P 4 0 R
    /Rect [200.00 720.00 400.00 740.00]
    /Subtype /Widget
    /T (Text Field2)
    /Type /Annot
    >>
    endobj
    11 0 obj
    <<
    /DA (/Helv 10.00 Tf 0.00 0.00 0.00 rg 0 G)
    /DR
    <<
    /Font <</Helv 15 0 R >>
    >>
    /F 4
    /FT /Ch
    /Ff 67239936
    /MK <</BG[0.87 0.83 0.55]>>
    /Opt [[( )( )] [(AMX) (American Express)] [(CBL) (Carte Blanche)] [(DCL) (Diners club)] [(DSC) (Discover)] [(ENR) (EnRoute)] [(JCB) (JCB)] [(MSC) (Mastercard)] [(VIS) (Visa)]]
    /P 4 0 R
    /Rect [200.00 650.00 300.00 670.00]
    /Subtype /Widget
    /T (Choice)
    /Type /Annot
    /V (VIS)
    >>
    endobj
    4 0 obj
    <<
    /Parent 2 0 R
    /Annots [7 0 R 9 0 R 10 0 R 11 0 R ]
    /MediaBox [0 0 595.00 842.00]
    /Resources
    <<
    /ProcSet [/PDF /Text /ImageI /ImageC]
    >>
    /Contents 5 0 R
    /Type /Page
    >>
    endobj
    5 0 obj
    <</Length 26>>
    stream
    q
    BT
    36 806 Td
    ET
    Q
    0 0 m
    endstream
    endobj
    3 0 obj
    <<[/PDF /Text /ImageI /ImageC]>>
    endobj
    12 0 obj
    <<
    /BaseFont /Helvetica
    /Subtype /Type1
    /Encoding /WinAnsiEncoding
    /Type /Font
    >>
    endobj
    xref
    0 13
    0000000000 65535 f
    0000000016 00000 n
    0000000172 00000 n
    0000002016 00000 n
    0000001756 00000 n
    0000001942 00000 n
    0000000081 00000 n
    0000000272 00000 n
    0000000603 00000 n
    0000000709 00000 n
    0000001017 00000 n
    0000001326 00000 n
    0000002064 00000 n
    trailer
    <<
    /Root 1 0 R
    /Size 13
    >>
    startxref
    2162
    %%EOF

  • Session expiration issue with parent and child window

    Hi,
    We have two applications (App1 - Implemented using JSF, Spring and Hibernate and App2 -Implemented using Spring MVC, Spring JDBC).
    I have implemented 'Test Access Content' functionality in App1.
    First admin user (Role- Manager) needs to login to App1
    As part of 'Test Access Content' functionality, he enters URL with encrypted key and click 'Test Access' button.
    It opens new window (implemented using java script - window.open) and hits spring controller of App2.
    In spring controller of App2, I am decrypting the key to get user details. After that i am setting user details in session, constructing final URL to display actual content.
    Problem is parent window maintains session till child window renders response. Once child window renders response, parent window loosing session.
    So, if i click any button in parent window after child window renders response, it displays login page as there is no session for parent window.
    Please note that App1 and App2 are sharing same domain. only context paths are different for both apps (app1 and app2).
    Any suggestions on this issue are much appreciated. Please let us know if you have any questions.

    Hi,
    When you open a child window from parent window then you can access child data in the parent window through javascript.
    We have a main web page. There are quite many links on it from which >user can open new web pages but the data is saved when the submit >button on the main page is clicked. Also data that user entered on the >other sub pages is not displayed in the main window.
    1 is this a case of parent and child window.case 1 When you are submitting the main page you need to run javascript function and get data from child windows and save that to database or session. next time when you are displaying the main window you need to query session or database to display the child window data in the main window.
    Case 2> closing child window and you need data in the parent. This can be done in two ways.
    1> When you are closing the child window populate some variables of the main window using javasript.
    2> Save the values in the database or session and refresh the main window and extract data from database or session
    Where should the data be saved that user enetered on the sub pages as the data is not shown in the main page - should it be stored in the session?It is design decision. You can store data in either session or database when you are closing the child window. But ifyou are saving the data on the main page then you can populate main page with child windows data using javascript. Save the data t database when main window data is saved. Depends on business requirements.
    In short if you are saving child windows data in session or database then you need to refresh main screen to pull that data otherwise populate main screen using javascript.
    I hope i answered your questions :) best of luck

  • How to get sharepoint online (office 365) data in cloud/windows azure (provider) hosted app using Javascript?

    How to get sharepoint online (office 365) data in cloud/windows azure (provider) hosted app using Javascript?
    I wish to retrieve sharepoint online data in html page (hosted in windows azure) using javascript and then need to play with AngularJS

    Hi,
    According to your description, you might want to get data from Office 365 SharePoint Online(also known as host web) and pass to the Provider Hosted App which is hosted
    in Windows Azure site.
    I would suggest you take a look at the links below about accessing data from the host web
     for a quick start:
    https://msdn.microsoft.com/en-us/library/office/fp179927(v=office.15).aspx#SP15Accessdatafromremoteapp_Codeexample
    http://dannyjessee.com/blog/index.php/2014/07/accessing-sharepoint-data-from-provider-hosted-apps-use-the-right-context/
    Aother sample solution for your reference:
    https://code.msdn.microsoft.com/SharePoint-2013-Get-the-0ec36bb6
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to define Side Panels for linked to Child Window Applications

    We are trying to use the NWBC Side Panel with PPM 6.0 in NWBC 3.5.  We have a Role that has a menu defined that gives the users a link to the INM_WORKCENTER_APP which displays the current user's Tasks in a table.
    When we click on a task in the table it opens the task details using the CPROJECTS_FPM application in a new window.  This new window that opens up doesn't have any of the Side Panels that we have defined on the role with the main menu links.
    We have tried to add the side panel using different application alias and at different levels in the Role, but can't get a Side Panel to show up on the child window.  We even tried to switch the window to open INPLACE in the main window and it still switches to no side panels.  The only side panels we are able to see is side panels that the user has manually added under connections and the Data Context Viewer side panels.
    Is NWBC capable of having side panels to be defined to be available for these linked to child applications that are called from a main application screen?  If so, what is the possible configurations we need to make on the role for this to work properly?
    Thanks in advance for any help!

    Wanted to close this thread with the solution that worked for us.
    We had to change the Launchpad configuration for Role CPROJECTS Instance OIF.  We changed the Application from a Web Dynpro ABAP type to Object Based Navigation.  Set the Application Parameters Business Object to PROJECT and Operation to DISPLAY.
    Then for our role defined in PFGC for our NWBC, we added a new menu item to the Web Dynpro application CPROJECTS_FPM with Configuration CPROJECTS_FPM.  Then under Object Based Navigation we set the Object Type to PROJECT and Method to DISPLAY to match what we set above in the Launchpad.  Then set the menu item to be invisible since we didn't want it to show to users.
    Now when we launch the child window it uses OBN and sees the definition in our role and utilizes the same Side Panel definitions defined for the role.

Maybe you are looking for