![]() ![]() ![]() |
Contents |
To add the chat applet in your web page, you have to insert the following code in the HTML page:
<APPLET codebase="." archive="chat.jar" code="Chat.class" width=85% height=80%>
<param name="fgColor" value="#333333">
<param name="bgColor" value="#CCCCCC">
<!--
By editing of following parameters set labels and messages in any language
-->
<param name="come" value="has come in chat">
<param name="left" value="has left the chat">
<param name="login" value="Login">
<param name="logout" value="Logout">
<param name="nick" value="Nickname : ">
<param name="password" value="Password (optionally) : ">
<param name="nick_used" value="Nickname is used">
<param name="bad_password" value="Incorrect Password">
<param name="enter_passw" value="Please, enter your nickname">
Your browser is NOT Java enabled
</APPLET>
The required attributes are code, archive, width, and height.
The code attribute specifies the main CLASS of the chat applet.
The archive attribute specifies the archive containing classes of the chat applet
The value width and height may be either a pixel; or a percentage of the available horizontal or vertical space. Thus, the value "50%" means half of the available space.
The codebase optional attribute specifies the location of the chat applet archive (the .jar file). The given directory is relative to the directory of the HTML document that contains the reference to the applet. If this attribute is missing, the Web browser will look for the applet's file in the same directory as the HTML document.
You can provide alternate content for non-Java browsers. You do this by placing standard HTML script commands for the alternate content right before the ending tag.
The <param> tag's two parts are NAME, which specifies the parameter's name, and VALUE, which associates a value with the parameter. The parameters let you customize the chat applet.
Description of the parameters. fgColor Foreground color of the applet(text labels and buttons labels). Must be specified as #RRGGBB. Default #000000. bgColor Background color of the applet. Must be specified as #RRGGBB. Default #CCCCCC.
![]() ![]() ![]() |
Contents |