Solved

Add html code to check end-user requirements

Posted on 2013-06-13
6
367 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 57

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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 

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 57

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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

691 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