Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9206187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:07:21+00:00 2026-06-18T00:07:21+00:00

ok i have this code (which i got from paul irish page+ some modifications)

  • 0

ok i have this code (which i got from paul irish page+ some modifications) (it gives you your ie version (standar stuff):

 <!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->
 <!--[if IE 7 ]>    <html class="ie7"> <![endif]-->
 <!--[if IE 8 ]>    <html class="ie8"> <![endif]-->
 <!--[if IE 9 ]>    <html class="ie9"> <![endif]-->
 <!--[if (gt IE 9)|!(IE)]><!--> <html class=""> <!--<![endif]-->
<head>
</head>
<body>
<h1>test:</h1>
<script type="text/javascript"> 
$(function test()) {
"use strict";
// Detecting IE
var oldIE
if ($('html').is('.ie6, .ie7, .ie8')) {
    oldIE = true;
}
if (oldIE) == true {
document.write("version<ie9")

} else {
   document.write(" version => ie9")

}
}
</script>
<script type="text/javascript"> 
<button type="button" onclick="test()">testing</button>
</script>
</body>

 </html>

the thing is it isnt showing the testing button

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:07:22+00:00Added an answer on June 18, 2026 at 12:07 am

    The <button> element should not be surrounded by <script> tags. After all, it’s HTML, not JavaScript.

    <!DOCTYPE html>
    <!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->
    <!--[if IE 7 ]>    <html class="ie7"> <![endif]-->
    <!--[if IE 8 ]>    <html class="ie8"> <![endif]-->
    <!--[if IE 9 ]>    <html class="ie9"> <![endif]-->
    <!--[if (gt IE 9)|!(IE)]><!--> <html class=""> <!--<![endif]-->
    <head>
    <title>A HTML document needs a title to be valid.</title>
    </head>
    <body>
        <button id="test">I feel so clickable today.</button>
    
    <!-- You must include jQuery before you can use its methods -->
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
    <script type="text/javascript">
    "use strict";
    
        (function ($) {
            // Assignment with the ternary operator
            var oldIE = ($('html').is('.ie6, .ie7, .ie8')) ? true : false;
    
            // You need at least jQuery 1.7 to use .on()
            $('#test').on('click', function() {
                console.log(oldIE);
            });
        }(jQuery));
    
    </script>
    </body>
    </html>
    

    N.B. I included jQuery because I saw a $ symbol in your code.


    Since you should be using the console during development, here’s a snippet that safeguards against JS errors in browsers that don’t provide a console.

    // Avoid `console` errors in browsers that lack a console
    (function(){var e;var t=function(){};var n=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"];var r=n.length;var i=window.console=window.console||{};while(r--){e=n[r];if(!i[e]){i[e]=t}}})();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this huge VB project which i just got from some one. i
I have this code with the switch statement which I got from this post
I have this code (which is way simplified from the real code): public interface
I have this code which will include template.php file from inside each of these
So I have this code, which is a page with a ListView search field
I have the following code which I got from http://css-tricks.com/startstop-slider/ I would like to
I have the following code which I got from http://css-tricks.com/startstop-slider/ I would like to
I have the following code which I got from http://css-tricks.com/startstop-slider/ I have it all
I have the following C++ code which I got from google's sparsehash website: #include
I have the code below which I got from the php: mktime manual just

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.