Solved

Add html code to check end-user requirements

Posted on 2013-06-13
6
359 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 52

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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 52

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

920 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

12 Experts available now in Live!

Get 1:1 Help Now