It will be much easier to get value in EJS with javascript call.
All the variables defined in EJS model can be access directly with javascript call.
For example:
if the name in applet tag is ejscode (name='ejscode')
And there is a variable call dt in ejs model.
You can get dt value with the following call:
dt=document.ejscode._model.dt;

Please check out [url=http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=714.0]Quiz: Do you know when two particles have the same horizontal speed?[/url]

I added JSObecj to EJS version 3 so that I can call javascript in the same html page from EJS simulation.
It was only work for Internet Explorer and it is not working for netscape at that time.
However, the code has been disabled in the current version.
It is at the end of org/colos/ejs/library/simulation.java
You can try to enable the code and re-compile it again if you really need it.