[5467] in java-interest
Java and JavaScript
daemon@ATHENA.MIT.EDU (Robby Stephenson)
Sat Feb 10 16:17:08 1996
To: java-interest@java.sun.com
Cc: ADV-HTML - ADVANCED HTML DISCUSSION LIST <ADV-HTML@UA1VM.UA.EDU>
Date: Sat, 10 Feb 1996 15:09:59 EST
From: Robby Stephenson <rlstep@MIT.EDU>
Hi, I've been looking all over the Web for info on the integration of Java and
JavaScript concurrently. My problem is this:
I have a two-frame document. The document in the first frame contains a
button. I would like an applet to display in the second frame when the button
is pressed. Thus far, I have tried this to no avail:
------------
Parent HTML document:
...
<FRAMESET ROWS="25%, *">
<FRAME SRC="Top.html" NAME="ConFrame">
<FRAME SRC="Bot.html" NAME="AppFrame">
</FRAMESET>
...
-------------
Top.html:
<HTML><HEAD><TITLE>APPLET TEST</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function ShowApp() {
parent.AppFrame.document.open();
parent.AppFrame.document.writeln("<HTML><HEAD><TITLE>
TEST</TITLE></HEAD>");
parent.AppFrame.document.writeln("<BODY>");
parent.AppFrame.document.writeln("<APPLET CODE='Test.class'
WIDTH=400 HEIGHT=500></APPLET>");
parent.AppFrame.document.writeln("</BODY></HTML>");
parent.AppFrame.document.close();
}
</SCRIPT></HEAD>
<BODY><H1 ALIGN=center>Control Frame</H1><HR>
<FORM><INPUT TYPE="button" name="show" value="Does it work?"
onclick="ShowApp()"></FORM>
</BODY></HTML>
---------------
Bot.html:
<HTML><HEAD><TITLE>TexShow Applet Test</TITLE></HEAD>
<BODY><H1 ALIGN=center>Applet Frame</H1><HR>
</BODY></HTML>
----------------
I know the button is working because I have tried to write other html text to
the window and that works fine. And Netscape's Document info window says that
there is an applet loaded. But, it never shows up. Anyone know what the
problem is?
Thanks,
Robby Stephenson
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com