Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

passing variables to an applet from a html page

 
kris reddy
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I would appreciate if some one could plz send a sample code or eaplain me, how we pass variables into an applet from a html page.
Thanx
kris
 
rjgopalr
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kris,
<APPLET > tag is used to specify the applet parameter.
Code = class name is where u specify the applet class name
<Param> tag is used to pass values to applet
<Param name> tag is used to specify the name of the parameter to the applet
<Param value> is used to specify the value to the parameter.
The parameter can be manipulated in the applet used getParameter method.

Hope the following code with the abovesaid explanation helps u in clarifying ur doubt.
Regards,
Raj
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
<TITLE></TITLE>
</HEAD>
<BODY>
<APPLET CODE="ChatClient.class" WIDTH=400 HEIGHT=300>
<param name="server" value="localhost">
<param name="port" value="8080">
</APPLET>
<P> </P>
</BODY>
</HTML>
 
kris reddy
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
Thanx for ur reply. I would also want to know if how I can pass variables in a html page into an applet in the same page or a different page.
say we have a text box in a html page, I want to pass the text typed in the text box, into the applet. How do I do this. I would be thankful if you could gimme a solution for this also.
Thanx once again
kris
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic