I want to create a website with a game in applet form.
I want to use the highscores that people get in the game to show up on a leaderboard on the website?
How is this achievable?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That can be done with JSObject, basically you pass information between Javascript and Java.
Example based on the documentation
.
Let’s say this is your Java Applet, the netscape.javascript.* library is used to call the Plugin container of your browser (the window your Java Applet runs in) to pass information to, or from it. This is example is from the documentation, you can change the version to your preferred JDK version to whatever version you use.
I will use the EMBED tag as an example, but the OBJECT (IE etc) tag can used also (see documentation in the link on top). The most important property you should not forget, is enabling
MAYSCRIPT=trueNow the javascript function in your HTML/PHP file
reference: java.sun.com/products/plugin/1.3/docs/jsobject