Solved

I'm trying to write a code that displays an alternate image gallery for those using IE 6 and below

Posted on 2011-03-04
3
324 Views
Last Modified: 2013-12-08
I'm trying to write a code that displays an alternate image gallery for those using IE 6 and below. Right now, I'm just testing it with a document.write command before moving on. It's (obviously) not working. Here's what I have:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>One World Circus</title>
</script>

<script type="javascript">
var browser = navigator.appName
var ver = navigator.appVersion
var thestart = parseFloat(ver.indexOf("MSIE"))+1
var brow_ver = parseFloat(ver.substring(thestart+4,thestart+7))
var test=new iesuckstest({
      wrapperid: "iesucks",
      dimensions: [490, 327],

if ((browser=="Microsoft Internet Explorer") && (brow_ver < 7))

(
document.write("Testing");
)
})

</script>
</head>

<body>

<div id="iesucks">
</div>
</body>
</html>
0
Comment
Question by:jgosney
3 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 250 total points
Comment Utility
http://www.quirksmode.org/css/condcom.html
<script type="javascript">
var test=new iesuckstest({
      wrapperid: "iesucks",
      dimensions: [490, 327]
}
</script>

.
.
.
<!--[if lte IE 6]>

<div id="iesucks">
According to the conditional comment this is Internet Explorer equal or lower than 6<br />
</div>
<script>
document.write("Testing");
</script>
<![endif]-->

Open in new window

0
 
LVL 27

Expert Comment

by:Tolomir
Comment Utility
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I had to do a bit of research to find the answer to this question so I thought I'd share my results.  Due to our outdated mainframe systems, we need to downgrade IE9 to IE8 in order to stay compatible.  We also needed to downgrade Java.  In order to…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.

772 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

11 Experts available now in Live!

Get 1:1 Help Now