Calling Java from Javscript (inside frames)

N

Neil Cherry

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.
 
N

Neil Cherry

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!
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top