Solved

Add html code to check end-user requirements

Posted on 2013-06-13
6
361 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 54

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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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 54

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article discusses how to create an extensible mechanism for linked drop downs.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

773 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