Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

passing variables to an applet from a html page

 
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
 
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
 
We're all out of roofs. But we still have tiny ads:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic