[4801] in java-interest
Re: passing arguments to applets
daemon@ATHENA.MIT.EDU (John Musser)
Mon Jan 15 16:49:33 1996
From: jmusser@dtd.com (John Musser)
Date: Mon, 15 Jan 1996 09:40:04 -0500
To: java-interest@java.sun.com
Cc: andruid@SLINKY.CS.NYU.EDU
One way to pass values to an applet is to use the
param tag. In example2.html from the animator demo:
<applet code=Animator.class width=200 height=200>
<param name=imagesource value="images/SimpleAnimation">
<param name=endimage value=2>
... other params ...
</applet>
As the example shows, any number of params can be sent.
In the java code this is retrieved in init() with:
imageSource = getParameter("IMAGESOURCE");
Hope this helps,
John
> the tutorial talks about how to get arguments passed in by java
> applications, but not by java applets. the natural thing would be
> able to set a property in the html file with a keyword tag like
>
> <applet codebase=whatever code=whatever myProperty="something">
>
> then getProperty("myProperty") would return "something".
> it doesn't seem to work this way.
> does it work at all??
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com