Basit Posted August 21, 2009 Share Posted August 21, 2009 Hi to all , Hope you all will be fine. I have a java applet which i call in php file, for applet to run you must install java. Actually i want to write a script(php, javaScript) before calling applet that check whether java is installed in the system or not, if installed then call the applet otherwise in place of applet show a link on which when you click it redirect to you java website. Is it possible? If it is then how can i do this please help. I just know that PHP can't do it so now i want to write javascript. Can any one help Thanks in advance Quote Link to comment Share on other sites More sharing options...
RichardRotterdam Posted August 21, 2009 Share Posted August 21, 2009 http://lmgtfy.com/?q=javascript+check+java+installed Quote Link to comment Share on other sites More sharing options...
Basit Posted August 21, 2009 Author Share Posted August 21, 2009 Hi friends Hope you all are fine. I did it by little bit Googling with the code <body> <script language="Javascript" type="text/javascript"> if(!navigator.javaEnabled()){ alert('Enable your java to expeirience this java enhanced page or\n try install it...'); window.open('InstallingJAVA.html'); //location.replace('http://java.sun.com'); location.replace('InstallingJAVA.html'); } </script> <noscript> Enabled javascript please </noscript> <?php $applet='<APPLET CODE = "Applet.class" ARCHIVE = "Applet.jar" WIDTH = "240" HEIGHT = "210" NAME = "xxxxxx" MAYSCRIPT = true> <PARAM NAME="uid" VALUE="'.$id.'"> <PARAM NAME="uname" VALUE="'.$uname.'"> </APPLET> '; echo $applet; ?> </body> </head> Thanks to everyone chill Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.