Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Java
Expertise: Intermediate
Mar 22, 2000

Embedding Multiple Applets in a Web Page



To embed more than one applet in a single web page, put each applet in its own subfolder within the folder that contains the HTML document. Use the APPLET tag's CODEBASE attribute to specify the folder that contains the applet.

For example, to embed the applets 'Aplt1' and 'Aplt2' in the web page defined by the file TestAplt.html, you can set up the following files and subfolders in a folder named Test:
 
 Test/TestAplt.html
 Test/Aplt1/<Class files for Aplt1> 
 Test/Aplt2/<Class files for Aplt2>
For files in this structure, put the following APPLET tags in the file TestAplt.html:
 
<applet codebase="Aplt1/" code=Aplt1 width=16 height=400 align="left">
<param name=ParamAplt1 value="Aplt1.djr">
</applet>
<applet codebase="Aplt2/" code=Aplt2 width=32 height=400 align="right">
<param name=ParamAplt2 value="Aplt2.djr">
</applet> 
Manoj K.
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap