control applet from new page

M

morenull

hello,

I am pretty new to the whole applet world, but have a good
understanding of Java in general, so please forgive my newbieness.

Here is the situation that I am trying to work out:

1. homepage.html has javascript to launch a new window which launches
an applet:


[homepage.html]
<script language="javascript" type="text/javascript">
...
console = window.open("some.html","some", "some,options");
...
if (event) { console.document.Foo.methodX("blah"); }
...
</script>


[some.html]
...
<applet name="Foo" id="Foo" code="FooApplet.class"
codebase="C:\working"></applet>
...


2. some.html links to another page, another.html

and, here is the question:
(drum rrrrrrrrrrrrrrrrrrrrrrrolllllllllllllll...)

is it possible for 'another.html' to somehow control the applet (Foo)
invoked by 'some.html'? for example, is it possible for
'homepage.html' to pass the reference <console> to 'another.html'? or
is there some other way that 'another.html' would be able to see the
applet <Foo>?

Thank you for any input you have!

--francisco--
 
D

Dag Sunde

hello,

I am pretty new to the whole applet world, but have a good
understanding of Java in general, so please forgive my newbieness.

Here is the situation that I am trying to work out:

1. homepage.html has javascript to launch a new window which launches
an applet:


[homepage.html]
<script language="javascript" type="text/javascript">
...
console = window.open("some.html","some", "some,options");
...
if (event) { console.document.Foo.methodX("blah"); }
...
</script>


[some.html]
...
<applet name="Foo" id="Foo" code="FooApplet.class"
codebase="C:\working"></applet>
...


2. some.html links to another page, another.html

and, here is the question:
(drum rrrrrrrrrrrrrrrrrrrrrrrolllllllllllllll...)

is it possible for 'another.html' to somehow control the applet (Foo)
invoked by 'some.html'? for example, is it possible for
'homepage.html' to pass the reference <console> to 'another.html'? or
is there some other way that 'another.html' would be able to see the
applet <Foo>?

var appletVar = opener.document.getElementById('Foo');
 
M

morenull

Dag,
thank you for your reply, i appreciate it. i have tried what you
suggested, but i can't seem to get it to work.... i get a
"opener.document.getElementById('Foo'); is null or ..." error. i have
looked online, and seent that it might be
window.opener.document.getElementById('Foo');, but i get the same
error. I will continue looking into this, but thought that you, or
maybe someone else, might have some more info for me. thanks again!

--francisco--
 

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
474,434
Messages
2,571,685
Members
48,796
Latest member
Greg L.

Latest Threads

Top