By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,384 Members | 1,829 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,384 IT Pros & Developers. It's quick & easy.

Calling Java from Javscript (inside frames)

P: n/a
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.setInte rval(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.objCamC tl.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 nc*****@comcast.net
http://home.comcast.net/~ncherry/ (Text only)
http://hcs.sourceforge.net/ (HCS II)
http://linuxha.blogspot.com/ My HA Blog
Oct 4 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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 nc*****@comcast.net
http://home.comcast.net/~ncherry/ (Text only)
http://hcs.sourceforge.net/ (HCS II)
http://linuxha.blogspot.com/ My HA Blog
Oct 5 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.