How can i refer to the parent window of the window containing an applet ?

Hi all,
I m stuck up with something. I have a web page say 'page1' which has a link that opens up a popup window. This popup say 'page2' window has an applet. On clicking particular pins on the applet i need to
direct page1 to another URL & close the popup window. i hv tried this code.
URL url = new URL(applet.getCodeBase(), path);
AppletContext appletcontext = applet.getAppletContext();
appletcontext.showDocument(url, "content");
JSObject win = JSObject.getWindow(applet);
win.eval("alert(\"Do u wnat to close!\");");
win.eval("window.close()");
This code opens up another window on click of the pin, & shows an alert before closing the popup window. On using
appletcontext.showDocument(url, "_parent"); or
appletcontext.showDocument(url, "_top");
The window containing applet gets refreshed with the URL but not page1.
How can i refer so to page1 from the applet.

You don't show your code for what parent or top are, but in an
applet, you must stick with relative links. Once you have the
appletcontext, use a relative path from there:
In the snippet below, docName is a relative path, i.e. ../up/above
   * Displays the specified document in the Web browser.
   * @param docName String pathname of document to download from Webserver
   * @return void
  private void fetchDocument(String docName) {
     AppletContext ctx = getAppletContext();
     java.net.URL serverURL = getDocumentBase();
     java.net.URL codeURL   = getCodeBase();
     java.net.URL docURL = null;
     try {
        docURL = new java.net.URL(codeURL, docName);
     catch (java.net.MalformedURLException err) {
        System.out.println("unable to compute URL from (" + serverURL + ", " +
                           docName + ")");
     if(this.bDebug)
       System.out.println("Open document: " + docURL.toString());
     ctx.showDocument(docURL);
  }

Similar Messages

  • How can I refer to the PhotoShop Object library dynamically depend on the release of PhotoShop?

    Recently, I make a program, now I face a big program:
    I make the program by visual basic and photoshop script , but my client have different release of Photoshop, for example : photoshop 7.0 cs and cs2. I know every release of PhotoShop have ist own Object library, but in visual basic 6.0, I can only refer to one PhotoShop Object library. for example: if I refer to Photoshop 8.0 Object library, if my clients release of Photoshop is 7.0. there will be a error message : Run-time error '429 ( cant create object) Run-time error '430(Class does not support Automation or does not support expected interface), How can I refer to the PhotoShop Object library dynamically depend on the release of PhotoShop?
    my email is : [email protected] .
    any suggestion?

    Please read, and reply back here with information https://forums.adobe.com/thread/1499014
    -and try some steps such as changing browsers and turning off your firewall for downloads

  • How can i check if the database contains the rows stated or not?

    hi there..
    i hav a problem here. I need to check the database if it contains the row of the attribute. If it doesnt not hav the row, i would then insert a new row into it, or else, i would only update the attribute. I have encountered a null pointer error and i've been trying to resolve it but i cant solve it. Here's my code..
    "i" is the attribute i wan to check if it exist in the database.
    "id" is the attribute i wan to check, from my JSP
    String m = null;
    String sql11 = "SELECT i from database WHERE i ='" + i+ "'";
    System.out.println(sql11);
    try {
    db = new Database();
    rs = db.readRequest(sql11);
    if (rs != null && rs.next()) {
    U u= new U();
    u.setU(rs.getString("i"));
    m = u.getU(); ==> this is the line tat's givin my null pointer
    System.out.println(m);
    db.close();
    } catch (SQLException se) {
    se.printStackTrace();
    throw (new UserException("Unable to retrieve from Database!"));
    } catch (Exception e) {
    e.printStackTrace();
    throw (new UserException("Unknow error encountered!"));
    if (m.equals(id)){
    //performs the updating of database
    else if (m_userID.equals("nil")){
    // performs the inserting of new row in the database
    }*/

    And what does getU() do?

  • How can i print all the contect of the code in sapscript window ? ?

    how can i print all the contect of the code in sapscript window ? ?

    Hi,
    Do you mean that you want to print the ABAP code to SAPscrip form ?
    Svetlin

  • Multiple calendars have appeared on my Iphone and I am unable to sync all of them to my PC, running Windows 7 and Office 2010. How can I sync all the calendars to my PC, or, merge the calendars on the Iphone so there is only 1 calendar to sync?

    Multiple calendars have appeared on my Iphone and I am unable to sync all of them to my PC, running Windows 7 and Office 2010. How can I sync all the calendars to my PC, or, alternatively, merge the calendars on the Iphone so there is only one calendar to sync?

    If the hard drive that crashed is the one that stored the itunes library, be sure to restore the library from Time Machine (mac) or whatever backup you use on windows.  That will get back your music.  I suspect that the replacement drive has an empty itunes library and thus, perhaps, the itunes match used that to sync to its servers.
    Try posting in the iTunes Match forum, you'll probably find more knowledgeable folks there.
    https://discussions.apple.com/community/itunes/itunes_match

  • I have hp 430 laptop,how can i re install the windows 7, if i not have original window on my laptop

    I have hp 430 laptop,how can i re install the windows 7, if i not have original windows on my laptop. i have oem number,
    But i have troubol to finishing installation of window.

    Originally the Notebook will have the Recovery Partition and that would give you an option to create a set of Recovery Disk. If you have not created those Recovery Disks when the Notebook was in working condition we cannot do that right now
    As of now if you need to recover your Notebook with the new Operating System you can check if the Recovery Partition is in a working condition or not, If yes you can easily recover/restore your Notebook
    If Recovery Partition is corrupted
    You need to call HP Technical Support and request for a set of Recovery Disks , So you can recover/restore your Notebook at the earliest
    OR
    You need call up Microsoft and purchase an Operating System with the License Key, So you can recover/restore your Notebook at the earliest
    I strongly recommend you to Contact HP Technical Support over the Phone for further assistance without any delay
    Hope this helps, for any further queries reply to the post and feel free to join us again
    **Click the KUDOS star on left to say Thanks**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.
    Thank You,
    K N R K
    Although I am an HP employee, I am speaking for myself and not for HP

  • How can I turn back the suggest option on iTunes when I purchase a song? somehow I close the window and now it doesn't come up

    how can I turn back the suggest option when I purchase a song? somehow I close the window that suggest the song similar to what we purchase on itunes

    NVM!!! Everything is strangely fine now!

  • I use Windows Vista and Microsoft Outlook. After migrating to iCloud, the calendar of iCloud tranferred only part of my past Calendar items to the folder iCloud Calendar in my Outlook. How can I transfer all the entries?

    I use Windows Vista and Microsoft Outlook. After migrating to iCloud, the calendar of iCloud tranferred only part of my past Calendar items to the folder iCloud Calendar in my Outlook. How can I transfer all the entries? In iCloud's site all are there.

    If the calendar is on iCoud.com, all you would need to do to get it on your phone is go to Settings>iCloud on your phone, sign into your iCoud account and turn Calendars on.  The iCloud calendars will then download to your phone.

  • My setup: iMac hardline to Canon i960 printer. Issue: endless printing of the same document. The printer window states that the pinter is in use and there is nothing listed in the Print Queue.  How can I stop printing the document?

    My setup: iMac hardline to Canon i960 printer. Issue: endless printing of the same document. The printer window states that the pinter is in use and there is nothing listed in the Print Queue.  How can I stop printing the document?

    Soution: Delete the printer and add the same printer back in, therefore creating a new print queue.

  • HT1338 How can i use my data on windows or mac when i use one of them in the same time?

    Hi,
    i have a Mac book with 2 operating system, ( Windows& mac). How can i use my data on windows or mac when i use one of them in the same time?
    Thank you

    The following article(s) may help you.
    Resolving duplicate calendars
    Resolving duplicate contacts

  • I'v just installed creative cloud 64 bit windows. How can I make bridge the default program to upload pictures rather than lightroom?

    I've just installed creative cloud 64 bit windows.  How can I make bridge the default program to upload pictures rather than lightroom?

    Usually the default program associated with an image file extension is an image developing Program like Lightroom or an image editing program like Photoshop. If you want to change the default associated program to Adobe Bridge you would use Window's Controls Panel file association applet.

  • Ive got a new pc with windows 7 and my ipod touch 4th gen is synced with my old pc ,how can i back up the photos on the ipod to my new pc ?

    ive got a new pc with windows 7 and my ipod touch 4th gen is synced with my old pc ,how can i back up the photos and music on the ipod to my new pc ?

    Your iPod can only be synced with one computer at a time.  If you try to sync it with a new computer/iTunes library, it will replace the contents of the iPod with whatever is in the new library. You should probably disable the autosync functionality first by going to Edit -> Preferences, clicking the Devices tab, and enabling the prevent iPods,iPhones, and iPads from automatically syncing option.
    Before doing anything else,  authorize the new computer with your iTunes Account.  In iTunes, choose Store -> Authorize This Computer and enter in the correct credentials. Either copy a backup file from your old computer to your new one or create a new backup of your iPod in iTunes before letting it sync.
    Then right->click on your iPod Touch from under the Devices section in the left hand pane of iTunes and choose Backup. You might also want to take a look at this article to see what it all included in the backup.
    iOS: How to back up
    Now onto synced content such as music, videos, photos, etc.  For iTunes purchases you can copy them back into iTunes by choosing File -> Transfer Purchases.  For all other nonpurchased iTunes content such as music, videos, and photos synced to the device, see this older post from another forum member Zevoneer covering different software available to assist you with this task.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    Once the backup has been made and all other synced content such as music, videos, and photos are back in your iTunes library, restore your iPod from that backup you made earlier.  Here is more on backing up and restoring your iPod.
    iTunes: Backing up, updating, and restoring iOS software
    If you do happen to lose any purchased content, you can always redownload it from the iTunes Store again at no cost via iCloud.  See this article for information.
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    B-rock

  • Upon launch of Lightroom after initial instalation a warning came up that said lightroom needs to create temporary files and cant open.  The it opened and the catalog i imported will not show the images.  How can I give permission? Running windows 8.1 64

    Upon launch of Lightroom after initial installation a warning came up that said lightroom needs to create temporary files and cant open.  Then it opened and the catalog i imported will not show the images.  How can I give permission? Running windows 8.1 64 bit.  I have avast virus software.

    Upon launch of Lightroom after initial installation a warning came up that said lightroom needs to create temporary files and cant open.  Then it opened and the catalog i imported will not show the images.  How can I give permission? Running windows 8.1 64 bit.  I have avast virus software.

  • Multiple calendars have appeared on my iPhone and I am unable to sync all of them to my PC running Windows 7 and Office 2010.  How can I sync all the calendars, or, alternatively, merge them?

    Multiple calendars have appeared on my Iphone and I am unable to sync all of them to my PC, running Windows 7 and Office 2010. How can I sync all the calendars to my PC, or, alternatively, merge the calendars on the Iphone so there is only one calendar to sync?

    If the hard drive that crashed is the one that stored the itunes library, be sure to restore the library from Time Machine (mac) or whatever backup you use on windows.  That will get back your music.  I suspect that the replacement drive has an empty itunes library and thus, perhaps, the itunes match used that to sync to its servers.
    Try posting in the iTunes Match forum, you'll probably find more knowledgeable folks there.
    https://discussions.apple.com/community/itunes/itunes_match

  • How can I set up the airport extreme base station with windows computer

    how can I set up the airport extreme base station with windows computer

    Hi - you need Airport Utility version 5.6.1 for Windows 7 - go to http://support.apple.com/kb/HT1547  to download it to your computer - the setup depends on what kind of modem you have and if you have another router connected - post back with this info to proceed - thanks

Maybe you are looking for

  • Phostoshop 64bit not working after last update 13.1.2

    After the  update phtotoshop 64bits is not working any more, I can use the 32bits. Any quick fix? this is my system info: Adobe Photoshop Version: 13.1.2 (13.1.2 20130105.r.224 2013/01/05:23:00:00) x32 Operating System: Windows 8 64-bit Version: 6.2

  • Embedding MP4 in web page

    Ok, here's the latest: I'm trying to embed an MP4 in my webpage that starts streaming/playing immediately, no pop-up window, and that loops. This is what i've got: <embed src="cuts_mpeg.mp4" CONTROLS="imagewindow" CONSOLE="video" width="380" height="

  • NI6602 pulse width measurement: Do I have to use an external sample clock?

    Hi In the .NET 4 example 'MeasPulseWidthBuf_SmplClk_Cont' it is stated in the comments that: An external sample clock must be used.  Counters do not have an internal sample clock available.  You can use the Gen Dig Pulse Train-Continuous example to g

  • Standard SAP Reporting Using Classes and Characterstics

    Hi Experts, I am currently interested in if there are any options to using classes and characteristics within standard reporting in SAP ECC.  I know some reports have the selection critiera and allow for other fields to be added to reports.  Does any

  • Create a two-way link (using AppleScript?) in Numbers '09

    We are migrating to iWork '09 for our business needs and seek an Applescript expert to advise us as follows. Our team has successfully used VBA in Excel for Mac 2004 to "two-way link" two cells in differing spreadsheets such that anything entered in