?
Solved

Add html code to check end-user requirements

Posted on 2013-06-13
6
Medium Priority
?
369 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 2000 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 58

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
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 

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 58

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Find out what you should include to make the best professional email signature for your organization.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
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…
Suggested Courses

762 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