Solved

Add html code to check end-user requirements

Posted on 2013-06-13
6
356 Views
Last Modified: 2013-06-17
What can I add to my HTML code to check and see if the user has Java installed, and is using internet explorer browser, and if not redirect to another page?
0
Comment
Question by:icecom4
  • 2
  • 2
  • 2
6 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 39246400
No JavaScript.
<noscript>
<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.site.com/somepage.com">
</noscript>

Test for IE

<!--[if IE]>
Add IE specific code.
 <![endif]-->
0
 

Author Comment

by:icecom4
ID: 39246648
thanks for the IE conditional statement, it works.  Had to add it to bottom of my html page, but that is fine.  

but the No JavaScript always redirects to http://www.site.com/somepage.com, while firefox does not.  I verified that I do have Java installed.
0
 
LVL 51

Expert Comment

by:Julian Hansen
ID: 39246857
Are you asking if JavaScript is enabled (which is what the above solution addresses) OR are you asking if Java (for running Java Applets in the browser) is installed?

If the latter see here for a discussion

http://stackoverflow.com/questions/9569795/how-to-detect-if-java-is-enabled-in-ie
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:icecom4
ID: 39248589
Lets see what you recommend...

There are some buttons on my intranet page that use javascript to work.  That is my one goal, to make sure that if a person clicks on the page, they are notified if they do not meet the requirements.  

After testing your script, yes my IE does redirect to http://www.site.com/somepage.com because it turns out that my IE has the java add-on disabled.  

However, I am wondering if I even need to check for the add-on, because the javascript buttons seem to work regardless.  

Perhaps javascript in html does not always need the add-on running?  As long as java in installed on the machine?  

If so, maybe I need the script to check for java being installed, regardless of the add-on??

Please let me know what you think, thanks.
0
 
LVL 58

Expert Comment

by:Gary
ID: 39248633
To be clear - Java and JavaScript are two completely different beasts.
JavaScript is not an add-on, it is integrated into the browser but can be disabled
0
 
LVL 51

Expert Comment

by:Julian Hansen
ID: 39249692
Following on from GarryC123's comments

the solution posted by GaryC earlier with the <noscript> is the correct way to check if the internal Javascript processing of a browser is enabled or not.

If your buttons work on Javascript and you want to redirect away if Javascript is disabled i.e. if the buttons will not work then that is the solution you need to use and accept.

The java "add on" is not relevant unless you are loading a Java applat (i.e. a java .class or .jar file that has code written in Java - not Javascript - that then runs inside its own container in the browser).

The difference - javascript is used to manipulate the DOM (the elements on your page). Java is typically used to write embedded functionality - applications - that run inside your browser.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now