morrisjohnny Posted June 2, 2011 Share Posted June 2, 2011 Hi firstly please excuse my stupidity hereRight before I ask, Please bare with me as I'm a total newbie to Java script/programming what everI've been given a task to take variables (currently using HTML as this ties in with other projects) and then insert then into what I think (pretty sure) is a Java program, is their anyway that this is possible in HTML or not? it has to be cilent side due to restrictions.I may add the Java program is running inside it's own window and cannot be integrated into the web page.If their is also a way to extract the information from the Java page on a click on a <button> and then file this into <input> boxes this could possible be looked into.Could someone please help point me in the right direction if this is possible or?Thanks Very Much =)Jny*Edit* (20:18) If their is also a way to extract the information from the Java page on a click on a <button> and then file this into <input> boxes this could possible be looked into. Link to comment Share on other sites More sharing options...
MrFish Posted June 19, 2011 Share Posted June 19, 2011 I'm a total newbie to Java script/programming what everJust to make sure. This is Java and not Javascript right?For java you will need to have some server-side interaction. If you wanted everything to be client side you would have to save files to the user's computer to be read by java. But browsers don't allow you to save content with javascript (different from java). So you'l have to submit the content to a server in order for java to access it. When you are running a java applet on your computer all the information is downloaded to your computer and you are in fact running it client side (even if it appear in a browser window). Since it doesn't have a connection with your server by default, you will need to learn how to use sockets to connect to a server to request data. You can request information using HTTP but this is much slower. If speed is not an issue for you then that won't be a problem and it would be much easier. But you cannot keep a live connection with HTTP. Once you send/receive the connection closes.If you go the socket route then you this means you will have to program a server-side application that waits for connections and responds with data. Basic web hosting doesn't allow you to run applications so you will have to get a dedicated or virtual private server in order to do that.An alternative solution if your application does not have to communicate with the server is just program the input fields and buttons on the java applet and save information to files on the user's computer.Hope this isn't too confusing. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.