I have just bought a java applet..
it can be cutomized to inegrate into my own membership system..

the applet code is as the following :

PART 1 :

document.write("<APPLET CODEBASE=http://www.mysite.com/hubz/");
document.write(" CODE=com.diginet.hubz.applet.Hubz.class ");
document.write(" WIDTH=0 ");
document.write(" HEIGHT=0 ");
document.write(" MAYSCRIPT ");
document.write(" ARCHIVE=HubzApplet.jar ");
document.write(" name=Hubz> ");
document.write(" <param name = cabbase value = HubzApplet.cab>");

/* The ID is the identification number for this user. If this cookie system
does not suit your needs, use any other ID as long as it is the equivalent
of a Java long (64-bit integer). */
id = getCookie("DigiNetID");
if(id == null) {
id = Math.random();
var dat = new Date();
dat.setTime(dat.getTime() + 365*24*60*60*1000);
var expString = "; expires=" + dat.toGMTString();
document.cookie = "DigiNetID" + "=" + escape(id) + expString;

document.write(" <param name = DigiNetID value = "+id+">");

/* The name of the server to connect to. This must be the same name
that the applet is served from. For http tunneling, this should be
the full URL to the HttpTunnelingServlet. */
document.write(" <param name = server value = www.mysite.com >");


I have to pass it the user information

PART 2 :

< param name = username value = 'any user' >
< param name = age value = '20' >

and so on..

and then it finished with :

PART 3 :

document.write(" </APPLET>");
document.write(" <!-- End Applet Code -->");

function getCookie(name) {
var result = null;
var myCookie = " " + document.cookie + ";";
var searchName = " " + name + "=";
var startOfCookie = myCookie.indexOf(searchName);
var endOfCookie;
if (startOfCookie != -1) {
startOfCookie += searchName.length;
endOfCookie = myCookie.indexOf(";", startOfCookie);
result = unescape(myCookie.substring(startOfCookie, endOfCookie));
return result;


now I think I have 3 parts.. the first constant one.. and the third constant one..
the second part is the dynamic one which should be generated usnig my php code..

my code now is similiar to :

<script "JavaScript">
PART 1 code.....

echo "<script language=\"JavaScript\">";
echo "document.write(\" <param name = username value = 'any user' >\");";
echo "</script>";

<script "JavaScript">
PART 3 code.....

this code be working..
but for sorry it doesn't..

I'm not a JavaScript programmer..
I just use it when I need to.

but this problem seems like something with its structure..
it seems that dividing the code to more than one <script> tag makes the stuff not to work ..
because when I put all the code in only 1 <script> tag.. it works fine..
but of course I can't write php code within <script> tags.. so I must divide it !!

any one plzzz help..

thanks a lot.. and I hope that my problems is understood