Calling Java from Javscript (inside frames)

Discussion in 'Javascript' started by Neil Cherry, Oct 4, 2005.

  1. Neil Cherry

    Neil Cherry Guest

    What I'm basically trying to do is call a Java applet public method (
    public void setInterval(int i) {...} ) from javascript in Firfox
    1.0.7. I've not done this before but most of google agrees that I
    should call it this way:

    document.CameraViewer.setInterval(t);

    That's if I were to call it outside frames. When I googled search for
    frames it suggested that I use the object name and form name also:

    document.formCamCtl.objCamCtl.WebCamViewer.setInterval(t);

    Now I looked at that and started to get confused because I'm working
    with framesets & frames (not by choice). Now What I've got is in
    index.html I've got a frameset call rightFrameset which has a frame
    called rightTop which includes the html file rightTop.html. Inside
    that I have the form formCamCtl inside that the object objCamCtl.

    Now I've tried:

    document.rightFrameset.rightTop.formCamCtl.objCamCtl.WebCamViewer.setInterval(t);

    but that doesn't work. What am I doing wrong (other than sticking with
    this code ;-). BTW, I inherited the code but I'll eventually move away
    from the frameset & frame first I need to understand what the controls
    are doing before I move them over to something else.

    --
    Linux Home Automation Neil Cherry
    http://home.comcast.net/~ncherry/ (Text only)
    http://hcs.sourceforge.net/ (HCS II)
    http://linuxha.blogspot.com/ My HA Blog
    Neil Cherry, Oct 4, 2005
    #1
    1. Advertising

  2. Neil Cherry

    Neil Cherry Guest

    On Tue, 04 Oct 2005 16:46:58 -0500, Neil Cherry wrote:
    > What I'm basically trying to do is call a Java applet public method (
    > public void setInterval(int i) {...} ) from javascript in Firfox
    > 1.0.7. I've not done this before but most of google agrees that I
    > should call it this way:
    >
    > document.CameraViewer.setInterval(t);


    I discovered the problem after simplifying the picture (I got rid of
    the frames). Turned out that my public Java method accesses a private
    variable. Once I switched the variable over to public I was able to
    properly access the mthod from javascript. Now that's one I did not
    find in my google search!

    --
    Linux Home Automation Neil Cherry
    http://home.comcast.net/~ncherry/ (Text only)
    http://hcs.sourceforge.net/ (HCS II)
    http://linuxha.blogspot.com/ My HA Blog
    Neil Cherry, Oct 5, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike

    NavigateUrl and Javscript

    Mike, Jul 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    385
    Martin Honnen
    Jul 17, 2004
  2. Darrel
    Replies:
    4
    Views:
    2,253
    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=
    Oct 26, 2004
  3. Benton
    Replies:
    4
    Views:
    1,113
    Mr Newbie
    Nov 26, 2005
  4. NUG-IT
    Replies:
    11
    Views:
    1,979
  5. RSH
    Replies:
    6
    Views:
    8,468
Loading...

Share This Page