//html code is
============
<SCRIPT language="JavaScript">
function startJSFractal() {
try{
var a= document.getElementById('ramesh').a;//working fine

var val = document.getElementById('ramesh').sec; //error is undefined
}catch(e){
alert('error:::'+e);
}
}
</SCRIPT>
<form name="Form1">
<embed code="demo.app.First" id="ramesh"
type="application/x-java-applet"
pluginspage="http://java.sun.com/out-of-proc-plugin-url-placeholder.xpi"
width="200" height="200">
</embed>
<input type="button" name="Button1" value="Start"
onClick="startJSFractal()" language="JavaScript">
</form>
First class
==========

public class First extends Applet{
public int a=10;
Second sec= new Second();
}
}


i want call second class reference from javascript using embed tag applet reference.but i getting the
error undefined please help me.........thanks