Communication between applets that are in different frames

Hi,
I have two applets in the same browser page but not in the same Frame, and I'm trying to invoke a method of one of the applets from the other. getApplet("NAME") does not work because both are in different frames.
I have managed to do the communication with a static method, but the invoked method doesn't have the correct variables values (also defined static), these variables have the default values (i.e. int = 0).
My program:
Applet A --> loads the data and waits for Applet B's invocation.
Later....
Applet B --> invokes an Applet A's static method, Applet A receives the data, Applet A is supossed to work correctly, but its data is not the previously loaded but the default values.
What am I doing wrong? Looking at this, it seems that the static method invoked is from a different class.
Has anyone any working example? Is there another way (not signing)?
Thanks

You could do it using javascript. From what it looks like you are describing :
In Applet A's page, have a javascript function that looks like the following :
function callAppletB()
     self.parent.frame[1].document.getElementById("insert applet b's id here").methodName();
}Then, in Applet B's page, make a similar function :
function callAppletA()
     self.parent.frame[0].document.getElementById("insert applet a's id here").methodName();
}Just make sure that Applet A's page is the first frame on your frameset page. Hope this helped.
Ed

Similar Messages

  • How do I chat between users that are under one .mac/MobileMe family acct?

    How do I chat between users that are under one .mac/MobileMe family acct? We are all under one account, but in different locations, using iChat 4.0.5 and OS 10.5.4. Thank you.

    The only way is to create separate accounts under either AIM or Jabber (for example Googletalk). Then everybody logs into iChat with a different user and you can have full iChat functionality (except encryption which works only if you have different .mac accounts). If some members of your family have already a gmail/googlemail account then they can use this account information to log into iChat if you create a Jabber account with the gmail user information. Otherwise go to www.aim.com, request a screen name and use this user information to create an AIM account in iChat.
    Have fun.

  • I want to establish a new and separate Apple ID from my husband's.  We have six Apple devices between us that are aleady associated with our current joint ID.How is this done?

    I want to establish a new and separate Apple ID from my husband's.  We have six Apple devices between us that are aleady associated with our current joint ID.How is this done?

    In order to have a separate 5GB of storage he would need to have his own iCloud account with a separate ID.  You can still share the same ID for iTunes; it does not need to be the same as the ID used for iCloud.
    In order to migrate his phone to a separate account, begin by saving any photo stream photos that he wants to keep on his phone to the camera roll by opening the photo stream album in the thumbnail view, tapping Edit, then tap all the photos he wants to save, tap Share and tap Save to Camera Roll. 
    Once this is done, go to Settings>iCloud on his phone, scroll to the bottom and tap Delete Account.  (This will only delete the account from this phone, not from iCloud.  Other devices still using the account will not be effected by this.)  When prompted about what to do with the iCloud data, choose Keep On My iPhone.  Next, set up a new iCloud account using a different Apple ID (if you don't have one, tap Get a Free Apple ID at the bottom).  Then turn iCloud data syncing for contacts, etc. back to On, and when prompted about merging with iCloud, choose Merge.  This will upload the data to his new account.
    Finally, if there is any merged data in the accounts you will then have to go to icloud.com on your computer and sign into each iCloud account separately and manually delete the data you don't want from each account.

  • Communication between applet and Web app (IE6 works IE7 doesn't)

    I'm not 100% sure this is the correct forum to post this in, but as the communication is initiated from the applet I'm posting it here.
    I have an applet that we are slowly breaking pieces out of into a web app.
    The details are as follows.
    The applet calls a servlet on the webserver with the following code.
    URL url = new URL("http://.................");
    ServletMessage message = new ServletMessage(url);
    InputStream returnStream = message.sendPostMessage(sending);The servlet takes the user credentials and other info that was sent and authenticates the user and stores the info that was passed into the session on the web server. Then based on the users permissions and where they want to go in the web app the servlets redirect method calls
    resp.getOutputStream().print("/AppName/appropriateServlet");This sends control back to the applet (including the url of the servlet that needs to be called) which then calls the appropriate servlet
    container.getAppletContext().showDocument(new URL("http://.............." + returnURL), "Title");Now the problem is that in the first and second servlet the request.getSession() returns two different sessions when running under IE7. IE6 returns reference to the same session.
    I don't know what has changed in IE7 but I was hoping somebody else has run into this, or can suggest a more appropriate forum to post this to?
    Thanks

    So the solution I came up with was when the applet jumps to the web app the first time instead of storing everything in session I store them in a map in the servletContext under their employee number.
    I then send control back to the applet with the url they should call. When the applet calls the web app for the second time it includes their employee number as parameter in the url.
    A Login filter then first checks to make sure it isn't on the first call, and checks to make sure they aren't in session... if so it pulls the map out of servletContext and transfers all the data back to the session and clears that user out of servletContext.
    So it stores the user in the servletContext during the transfer back and forth, then back in session like normal.
    I'm pretty sure it is going to work, but I can't test it because our mainframe test region is down which is what handles the authentication of the applet.

  • How to get average between rows that are null?

    I need to get the average between the 2 positive numbers.
    Then update the table with the average for those rows that are NULL between the 2 positive numbers.
    The average will come (78+89)/2= 83.5. Round it to 84.
    Then it will be:
    6-4-13       84
    6-5-13        84
    6-6-13        84
    As for 6-9-13 and 6-10-13, those values will still be NULL.
    {code}
    create table dummy( tmestmp date
    ,maxtemp number(4,0));
    insert into dummy(tmestmp,maxtemp) values(to_date('20130601','YYYYMMDD'),70);
    insert into dummy(tmestmp,maxtemp) values(to_date('20130602','YYYYMMDD'),81);
    insert into dummy(tmestmp,maxtemp) values(to_date('20130603','YYYYMMDD'),78);
    insert into dummy(tmestmp) values(to_date('20130604','YYYYMMDD'));
    insert into dummy(tmestmp) values(to_date('20130605','YYYYMMDD'));
    insert into dummy(tmestmp) values(to_date('20130606','YYYYMMDD'));
    insert into dummy(tmestmp,maxtemp) values(to_date('20130607','YYYYMMDD'),89);
    insert into dummy(tmestmp,maxtemp) values(to_date('20130608','YYYYMMDD'),91);
    insert into dummy(tmestmp) values(to_date('20130609','YYYYMMDD'));
    insert into dummy(tmestmp) values(to_date('20130610','YYYYMMDD'));
    {/code}
    I need the output to look like this:
    Header 1
    Header 2
    01-JUN-13
    02-JUN-13
    03-JUN-13
    04-JUN-13
    05-JUN-13
    06-JUN-13
    07-JUN-13
    08-JUN-13
    09-JUN-13
    10-JUN-13
    70
    81
    78
    84
    84
    84
    89
    91
    null
    null
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
    PL/SQL Release 10.2.0.4.0 - Production
    "CORE 10.2.0.4.0 Production"
    TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    Suggestions?
    TIA.
    Steve42

    select  tmestmp,
            nvl(
                maxtemp,
                round(
                       last_value(maxtemp ignore nulls)
                         over(order by tmestmp) +
                       first_value(maxtemp ignore nulls)
                         over(order by tmestmp
                              rows between 1 following and unbounded following
                      ) / 2
               ) maxtemp
      from  dummy
    TMESTMP                MAXTEMP
    06/01/2013 00:00:00         70
    06/02/2013 00:00:00         81
    06/03/2013 00:00:00         78
    06/04/2013 00:00:00         84
    06/05/2013 00:00:00         84
    06/06/2013 00:00:00         84
    06/07/2013 00:00:00         89
    06/08/2013 00:00:00         91
    TMESTMP                MAXTEMP
    06/09/2013 00:00:00
    06/10/2013 00:00:00
    10 rows selected.
    SQL>
    SY.

  • Copy Key figure data between two planning area with different storage bucket profile

    Hi,
    I have a DP planning area ' PA1' with monthly storage bucket profile data view 'PA1M' ( monthly TBF) and I want to copy the data to another planning area 'PA2' whose storage bucket is weekly. This would need me to write a custom program which will split monthly to weekly and then populate 'PA2'.
    However, In 'PA2', I created two data views 'PA2W' (with weekly time bucket profile) and 'PA2M' (with Monthly Time bucket profile). If I am able to copy the data from PA1 (PA1M) to PA2(PA2M), it will automatically splits monthly to weekly in PA2W.
    So my question is if there exists a way I can copy key figure data from PA1M to PA2M? Any BAPI?

    Hi Rakesh,
    You can use COPY/Version Management Function to do this.
    Path: Demand Planning > Environment >Copy/ Version Management
    The system takes into account only those periodicities that are common to both planning areas.
    For example, if the data is saved in months in the source planning area (PA1) but in months and weeks in the target planning area (PA2)
    the system copies to months in the target planning area and then Disaggregates the data to the storage buckets in accordance with the Time-based Disaggregation.
    hope this wil help to understand the basic concept.
    Kapil

  • Communication between Applets & Servlets

    How do you communicate in between Applets & Servlets ?

    http://forum.java.sun.com/thread.jsp?forum=45&thread=525518&start=0&range=15#2519429

  • Please help!! Can I pass a variable between 2 swf's that are on different html pages?

    Hey,
    Does anyone know how to pass a variable (string) from one swf
    to another if there in separate html pages?
    I assume I’d have to send the variable from the first
    page and load it into the second but I don’t know what
    functions or code I should be using. Any suggestions would be a
    HUGE help.
    Thanks
    If it helps: I’m creating a log in and sign up sheet
    that can be accessed from several sites. I’d like to record
    which site the user has come from when they signup.
    Thanks

    if they are open at the same time (for the same user), you
    can use the localconnection class to communicate between the
    two.

  • How can I vertically align items that are in different regions

    Hello,
    I am a novice developer in APEX. I am creating a page which has 4 regions on it. Right now it looks like the following:
    ----region 1----------------------
    label: field label4: field
    -----region 2--- region 3--
    label: field label45: field
    -----region 4---------------------
    label:field [one-item-worth-of-space. next item aligned to right of item below]long_label: field
    label: field label: field
    I am trying to vertically align the items in these regions, in such a way that all the colons are vertically aligned.
    I am having a particular alignment problem in region 4, column 2 (item are bold). Both label:field, and long_label:field in region 4 have the same vertical/horizontal alignment option as the rest of the region (right for label, left for field). For some reason, there is one item space between these two items. This space is removed if I switch the two fields.
    I would really appreciate any help trying to understand
    - how to remove the one-item-equivalent space between two items in region 4
    - how to vertically align all these fields in different regions on one page.
    I tried to create the original scenario in bold, but the post would not allow space formatting. I apologise if it is difficult to understand
    Thank you in advance for your time.
    RHaq

    This is not the APEX forum. Post your question in this forum:
    Oracle Application Express (APEX)

  • Socket communication between applet and an AP on simulastor

    Hi!
    I implemented my system under Server/Client model.
    The server is running in a Set-Top-Box simulator, which
    creates a ServerSocket on port 9190.
    The client is an applet and using the following codes to connect to server:
    ==========================================
    Socket socket = new Socket("127.0.0.1", 9190)
    InputStream in = socket.getInputStream();
    OutputStream out = socket.getOutputStream();
    ==========================================
    When I start the applet, no exceptions are thrown,
    and objects socket, in and out are not null.
    But when I was trying to send a string to server,
    ==========================================
    out.write("a string".getBytes());
    ==========================================
    nothing happened. Server didn't get anything.
    What's wrong? How can I solve this?

    First of all "nothing happend" is something you tell the DELL helpdesk.
    This is a developer forum.
    My guess is you are using somthing of a in.readLine() on the server and since the
    client doesn't sent a linebreak it will hang there.
    Or the client gets an AccessControlException that you silently catch and therefore get
    no exception. Allthough the InputStream would be declared in the try block (according
    to posted code) and can not be checked for beeing null in the catch (out of scope).
    Here is some sample code of client and server, try to implement the run method in
    your client and run both appTest and applet on the local machine (http://127.0.0.1).
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.net.ServerSocket;
    import java.net.Socket;
    public class appTest implements Runnable {
         public appTest() {
              new listner().start();
              new Thread(this).start();
         // main program
         public static void main(String argv[]) throws Exception {
              new appTest();
         public void run() {
              // the client
              try {
                   Socket s = new Socket("127.0.0.1", 9190);
                   // if multiple messages are to be sent and received
                   // this is where you start a new thread
                   byte b[];
                   OutputStream out = s.getOutputStream();
                   InputStream in = s.getInputStream();
                   String message = "hello from client";
                   int messageLength = message.getBytes().length;
                   // writing the length of the message
                   out.write(new Integer(messageLength).byteValue());
                   b = message.getBytes();
                   // writing the message
                   out.write(b);
                   // reading the length of the message and setting the byte array to
                   // it
                   b = new byte[in.read()];
                   in.read(b);
                   // receiving the message
                   System.out
                             .println("received massage from server: " + new String(b));
                   out.close();
                   in.close();
              } catch (Exception e) {
                   e.printStackTrace();
         class listner extends Thread {
              public void run() {
                   try {
                        ServerSocket srv = new ServerSocket(9190);
                        while (true) {
                             try {
                                  System.out.println("before accepting a client");
                                  Socket s = srv.accept();
                                  System.out.println("after accepting a client");
                                  // if multiple messages are to be sent and received
                                  // this is where you start a new thread
                                  byte b[];
                                  OutputStream out = s.getOutputStream();
                                  InputStream in = s.getInputStream();
                                  // reading the length of the message and setting the
                                  // byte array to
                                  // it
                                  b = new byte[in.read()];
                                  in.read(b);
                                  // receiving the message
                                  System.out.println("received massage from client:"
                                            + new String(b));
                                  System.out.println("sending message from server:");
                                  String message = "hello from server";
                                  int messageLength = message.getBytes().length;
                                  // writing the length of the message
                                  out.write(new Integer(messageLength).byteValue());
                                  b = message.getBytes();
                                  // writing the message
                                  out.write(b);
                                  out.close();
                                  in.close();
                             } catch (Exception ex) {
                                  ex.printStackTrace();
                   } catch (Exception e) {
                        e.printStackTrace();
    }

  • No communication between FIOS Westell routers at different locations

    I have CrashPlan running at home. It uses port 4242. I had 10 computers at multiple locations that were backing up to me when I was using cable. Some of the locations also had cable and some had FIOS.
    Ever since I changed from cable to FIOS at home, none of the FIOS routers are talking to each other. All the cable folks are still backing up to me. But none of the FIOS routers are backing up to me now. All the FIOS routers are Westell A90-9100EM15-10.
    Any help would be greatly appreciated.

    columbiavol wrote:
    I have CrashPlan running at home. It uses port 4242. I had 10 computers at multiple locations that were backing up to me when I was using cable. Some of the locations also had cable and some had FIOS.
    Ever since I changed from cable to FIOS at home, none of the FIOS routers are talking to each other. All the cable folks are still backing up to me. But none of the FIOS routers are backing up to me now. All the FIOS routers are Westell A90-9100EM15-10.
    Any help would be greatly appreciated.
    You may need to open port 4242 on the routers firewall. By default the Verizon firewall blocks the incoming "non standard" ports above 1024. So you may need to go in and do some port forwarding to open up the Verizon firewall. I'm not really very good at the port forwarding, if you need help with that, others here will be able to offer better advice on how to do that. But that would be my guess as to what is causing your problem.
    Edit
    Oops, just re-read your post. I didnt catch the point where you said the cable people could still communicate with you. In that case, the port forwarding may not be the issue.
    ====================================================================================
    Error exists between keyboard and chair.

  • No communication between applet - servlet

    hi
    my applet and my servlet is not at all communicating in the browser.
              any body knows how to solve this problem?
              in my applet code:Jus i am pasing as name string to invoke the serlvet via URL
              String location = "http://ctp-vi0275:8880/HandlePassword?"+"Name=XXX";
              URL testServlet = new URL( location );
              URLConnection servletConnection = testServlet.openConnection();
              servletConnection.setDoInput(true);
              servletConnection.setDoOutput(true);
              servletConnection.setUseCaches (false);
              servletConnection.setDefaultUseCaches (false);
              servletConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
              servletConnection.connect();
              i have changed server.xml file to listen the port number 8880.(in tomcat)
              in my servlet code:
              doGet Method in servlet
              String str = req.getParameter("Name");          
              System.out.println(str);
              here i am jus printing the name
              but when i run my applet is not at all invoking the serlvet - HandlePassword.I have placed the
              servlet in ROOT\web-inf\classes\HandlePassword
              in web.xml
              <web-app>
              <servlet>
              <servlet-name>HandlePassword</servlet-name>
              <servlet-class>HandlePassword</servlet-class>
              </servlet>
              <servlet-mapping>
              <servlet-name>HandlePassword</servlet-name>
              <url-pattern>/HandlePassword</url-pattern>
              </servlet-mapping>
              </web-app>
              where i am doing wrong here?

    You do following things and let me know:
    1. Does the servlet work when you type "http://ctp-vi0275:8880/HandlePassword?Name=XXX" in your browser?
    2. Run applet using appletviewer. Does it work?
    3. If it works using appletviewer then enable java console in your browser and see error stacks if any.
    4. If there are applet security errors on java console, try creating servlet URL in applet code by calling getDocumentRoot() method and see what happens.

  • Creating zones that are on different subnets

    Hi,
    I am running Solaris 10 11/06 with zones. I had no issues creating zones with the same default router as the global zone. However, I want to create zones that will live in the DMZ, on a different subnet. I have looked around and the only thing I could find was to add the new subnet in the defaultrouter on the global zone.
    192.168.69.1 default route for global and zone 1
    10.10.6.1 default route for zone 2
    cat /etc/defaultrouters
    192.168.69.1
    10.10.6.1
    I did that, rebooted, and created the new zone. The new zone did not get the default route set. It was also not set in the global. The only way I can get this to work, is run :
    route add default 10.10.6.1
    I have created an init script to add this route at bootup on the global zone.
    Is this the right way to handle multiple subnets on a container host? Do I need to add the network in ./etc/netmasks?
    Thanks,
    David

    If you are stuck with update 3, this is a workaround we did on our system.
    create a startup script /etc/init.d/zone-defaultroute
    #!/usr/bin/sh
    #######START######
    /usr/sbin/ifconfig interface:x addif zone2_ipaddress netmask up
    /usr/sbin/route add default ip_router_zone2
    /usr/sbin/ifconfig interface:x removeif zone2_ipaddress
    /usr/sbin/zoneadm -z zone2 boot
    #######END########
    link the file to rc3.d
    ln -s /etc/init.d/zone-defaultroute /etc/rc3.d/S90zonedefaultroute
    Edited by: almazh on Oct 16, 2007 2:27 PM

  • Finding missing files that are a different file type?

    I had several folders of jpegs that i converted to dng with lightroom.  I lost the dng files and now i only have the original jpegs.  when i introduce them back to lightroom it no longer recognizes them because of the different file type.  When i "find" and individul file it works and the missing dng is replaced with the jpeg.
    The find nearby files option does not work and finding thousands of files individually is just not going to work.  I don't want to reimport because i will lose all the work i have done to these files.
    Any ideas?  Maybe I should wait for 3.0?
    thanks,
    Braden

    ... the dng converter wont convert a jpeg to dng only camera raw files...
    Didn't know about that.
    In this case, you can use Lightroom to convert to DNG:
    Start a fresh catalog.
    Import all your JPEGs.
    Use the Convert to DNG command in Library module to convert all JPEGs at once. It will place the new DNGs in the same catalog as the source JPEGs.
    Open the original catalog where the DNGs are missing — the old catalog should be fine finding the newly created DNGs now.
    You can now trash the "new" catalog.

  • Communication between applets using socket

    Hi,
    we have an application in which based on certain criteria a video is bieng played in the applet on same machine.Now we have to separate the video component from the application part so that video can be played separately. they will be communicated using socket.Can any body tell me how to go about for the solution.

    To do this you must have a server application listening to a port on a server box that has a fixed IP. In your Java app, you need to create a Socket connection back to the server (may need to sign your jar - but maybe not)
    voila you're there.
    You may want to search google + these forums for my InfoFetcher class which is built to grab data from an inputstream and report updates to listeners

Maybe you are looking for

  • Creating a folder structure when burning an MP3 format CD

    I have just purchased a new car that has a stereo system capable of playing MP3 encoded discs. This obviously allows for multiple albums to fit on one CD. The stereo allows you to browse hierarchical folders on the CD and select tracks from witihn ea

  • HT1212 forgot my passcode and my iPhone disabled, I have no Backup, I do not want to lose my data. Please, What to do ??

    I have forgotten my passcode of my iPhone5s, never sync or bucked up my iPhone, please help me to unlock my iPhone Passcode back, I have more than 1300 Contact number, and more than 2800 photo. I tried to get the help throughout your support web page

  • Video audio lower than Music audio?

    An example I ran across was The Postal Service. The song "Such Great Heights", would play at one audio level, while the audio is much more quiet for the video for "Such Great Heights". Is there a reason? Or am I completely off? Such Great Heights - A

  • "APPLE TV CAN'T CONNECT TO SERVER." HOW DO I FIX?

    APPLE TV WAS WORKING FINE LAST NIGHT. TONIGHT I GET MESSAGE "APPLE TV CANNOT CONNECT TO SERVER". HELP.

  • Error in File

    Hi everyone, The following code create an execution time error and I can not find the solution for this. If you help me, I will be happy. import java.io.*; class Files {      // properties      static int first = 0;      // constructor      public Fi