Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8288439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:17:07+00:00 2026-06-08T12:17:07+00:00

I wasted 4 hours searching and trying, but no luck. if ((navigator.plugins) && (navigator.plugins.length))

  • 0

I wasted 4 hours searching and trying, but no luck.

if ((navigator.plugins) && (navigator.plugins.length)) {
    for (var xx = 0, l = navigator.plugins.length; xx < l; xx++) {    
        var tn = navigator.plugins[xx].name;    
        if (tn.indexOf("Java") != -1) {
            document.write("Found ");
        } 
        else {
            document.write("Nothing ");
        }    
    }
}

Insteading of writing just “Found” or “Nothing” this script writes the following:

NothingNothingFoundNothing

(there are 4 plugins btw):

How do I fix this so that I only receive one answer? I don’t want other way to find if Java is installed, just the above but working.

Edit:
Thanks both of you, now it’s working.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T12:17:08+00:00Added an answer on June 8, 2026 at 12:17 pm
    if ((navigator.plugins) && (navigator.plugins.length)) { 
        var found = false;
        for (var xx = 0, l = navigator.plugins.length; xx < l; xx++) { 
    
            var tn = navigator.plugins[xx].name; 
    
            if (tn.indexOf("Java(TM)") { 
               found = true;
            } 
    
        } 
        if(found) { 
            document.write("Java "); 
        } else { 
            document.write("Nothing "); 
        }
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm embarrassed by the 'basicness' of this question, but after wasted hours, here goes.
I would not say I wasted my time, but spent around few hours changing
Alright wasted hours and hours trying to get MSSQL Server 2008 to login via
I hopw the answer is simple, but I swear I've wasted hours on this.
Just wasted 3 hours trying to figure out why the GPS icon is still
This must be simple and already answered, but I've wasted many hours on it.
I've just wasted the past two hours of my life trying to create a
I'm getting kinda crazy over here because I already wasted two hours getting my
I've just wasted a day trying to find the answer on my own. I
I've wasted at least a half day of my company's time searching the Internet

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.