I need a bit of your help. I hope you could find a minute to take a look at my problem.
I'm using JAVA telnet application ( http://javatelnet.org/space/start )
You can download JTA application at this link ( http://javassh.org/download/jta26.jar ) You can use this applet with html code below:
<html>
<body>
<applet CODEBASE="."
ARCHIVE="jta26.jar"
CODE="de.mud.jta.Applet"
NAME="Appletas"
style="width: 250px; height: 250px; float: left;">
<param name="config" value="applet.conf">
</applet>
</body>
</html>
You could also use applet.conf file placed in the same directory as your html page and .jar file is.
For example, if you put these lines inside of the applet.conf file:
Applet.detach = true
Applet.detach.startText = Press to Start!
Applet.detach.stopText = Press to Stop!
Applet.detach.immediately = false
Socket.host = 10.0.0.1
Socket.port = 23
Applet would be loaded and you could see .startText (button with the "Press to Start!" text). If you click on that button, application will start. It will try to connect to the device which has ip address of 10.0.0.1 via telnet ( port 23) protocol.
I'm looking how to achieve this with javascript. I want to load this applet hidden at the start. After that, there would be my own buttons, written in html, not in java. I want to call this applet by clicking on these buttons, and they would execute the same java command ( command which is starting the applet when we press a button with .startText).
I know we can call java functions from javascript like this:
<SCRIPT LANGUAGE="JavaScript">
function runAppletFunction()
{
document.AppletName.functionWeWantToCall();
}
</SCRIPT>
So, I tried to find these functions on jta26.jar java code. I found a great java decompiler.
Looks like there is 3 main functions : init() , start(), stop(). Stop function is working, I can call this function from javascript, and java telnet application will close if it's running. I'm not successfull with another functions, there is no errors too. I don't know how could I debug what is happening when I click on the .startText button, and which function is called, because after that click, telnet application is opened (that's what I'm looking for).
To save your time, I will add the main code of the application in another post ( because I can't add more than 2 hyperlinks at once, please reply anyone to this post first), but if you have a minute, please, check my html code with the applet in real. I know you guys could help me to figure out this problem. I just need to call the right function , in the right way.
I highly appreciate your help.