Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: check for java

  1. #1
    Regular Coder
    Join Date
    Apr 2005
    Posts
    388
    Thanks
    0
    Thanked 0 Times in 0 Posts

    check for java

    howdy,
    I have a page that uses java, I didn't write the code, don't know java, is there a way to check to see if java is enabled or not and then either open the java page or open a page where the user can go to download java? If so could you please post a sample of the code or a url where I can get it.

    tia.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Java Installed?</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script type="text/javascript">
    function isJava(){
    	if(!navigator.javaEnabled())
    	{
    		var message = confirm("You either have java disabled or you currently don't have java installed. Would you like to download java?");
    		if(message)
    		{
    			window.location = "http://java.sun.com";
    		}
    	}
    }
    window.onload = isJava;
    </script>
    </head>
    
    <body>
    
    </body>
    </html>
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Regular Coder
    Join Date
    Apr 2005
    Posts
    388
    Thanks
    0
    Thanked 0 Times in 0 Posts
    perfect, exactly what I was looking for, I stuck this in the <head></head> turned java off on firefox, and it works like a charm.
    thank you much.
    some day I will tackle java/js but just too much to do now.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •