• 0

Display Unobtrusive Message for IE Users?


Question

Hi, I have been designing my website to look good in Firefox. I've discovered that my website displays poorly in IE 7 and 8. I was wondering if there is a Javascript code that I can insert into the head of my website that would display a non obtrusive message at the top

of my site that only IE users will see. I am looking to put like a thin horizontal bar at the top of the page with an X in the corner that you can close out of.

The message would say something along the lines of:

This website displays best in a modern browser like Firefox, Opera, Google Chrome or Safari.

Then so that the message does not come back every time they go to a different page, perhaps it would remember when they close the message.

Does anybody know if there is an easy solution for this?

I have already implemented a message that says my website is completely unsupported on IE6. I didn't bother making it unobtrusive because the website is literally completely unusable in ie6.

Any help would be very appreciated. :)

Thanks,

-Neil

Link to comment
Share on other sites

Recommended Posts

  • 0

so i just checked the website in OP's signature, the one that matches his description of the missing sidebar in IE8, and I'm sorry but you don't get to trash IE's rendering when your website has 242 errors.

Most of those errors were created automatically by the template creator I used. I'm sorry. I'm not in the business of fixing the web. If it displays fine, that's all that matters to me. If there's something wrong with it, I will fix it. What I will not fix is something that is broken in internet explorer.

My website is one big experiment so it's my right to design it however I want. I started knowing nothing about html, css, javascript and php... and in the short amount of time that I've put into designing my website, I've made something that I think is really cool compared to a lot of what I've seen out there. Sure, my methods are a little unorthodox but that's only because I haven't read text books and learned convention and frankly, I don't care. I'll really take the time to learn that stuff when I feel like it. As for now, IE8 is not a good contender to the browser lineup, even if it does have a massive userbase. It gives me peace of mind to not support it and I laugh at people who get mad at it.

Link to comment
Share on other sites

  • 0

Okay, this code is probably buggy, I did it quickly, so I apologize in advance.

HTML:

<html>
<head>
<link rel="stylesheet" src="blah.css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script>
<title>Blah</title>
<script>
$('#close').click(function() {
  $('#message').fadeOut('slow', function() {
  $('#message').remove();
  });
});
</script>
</head>
<body>
<!--[if IE 6]>
<div id="message">This site works better, blah, blah.<span id="close">x</span></div>
<![endif]-->
</body>
</html>

CSS code for file blah.css:

#message {
background-color: #000000;
color: #FFFFFF;
display: block;
height: 40px;
left: 0;
position: absolute;
top: 0;
width: 100%;
}

#close {
position: absolute;
right: 5px;
}

What this does (or is supposed to do, again, I apologize) is display a message contained in the div with the id message, and fade out when the user clicks the x.

Link to comment
Share on other sites

  • 0

You don't want to support IE thats fine. Its your choice to make. But don't trash IE when you have 200+ errors in your code. Html markup is like instructions for the browser. If the instructions are incorrect how do you expect something following instructions to do what you wanted it to do ?

Sure I am going to say go south when I want somebody to go north and call it my style of directions. Then I am going to call people incompetent when they read my instructions and go south. Bravo !

Link to comment
Share on other sites

  • 0

It's funny when everyone is telling you to fix the errors to fit IE, and I run into MANY sites that only support IE and screw everyone else. The fact is that IE has never followed compliance to standards that other browsers do. I do try to fix errors in IE and Firefox and don't worry about other browsers, but I wouldn't go out of the way if I were you. You can NEVER please everyone. If it's important later, worry about it then. With any luck IE will actually get better in their compliance and you won't have to worry about it.

Link to comment
Share on other sites

  • 0

Okay, this code is probably buggy, I did it quickly, so I apologize in advance.

HTML:

<html>
<head>
<link rel="stylesheet" src="blah.css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script>
<title>Blah</title>
<script>
$('#close').click(function() {
  $('#message').fadeOut('slow', function() {
  $('#message').remove();
  });
});
</script>
</head>
<body>
<!--[if IE 6]>
<div id="message">This site works better, blah, blah.<span id="close">x</span></div>
<![endif]-->
</body>
</html>

CSS code for file blah.css:

#message {
background-color: #000000;
color: #FFFFFF;
display: block;
height: 40px;
left: 0;
position: absolute;
top: 0;
width: 100%;
}

#close {
position: absolute;
right: 5px;
}

What this does (or is supposed to do, again, I apologize) is display a message contained in the div with the id message, and fade out when the user clicks the x.

Thanks for taking the time to write this. :) This is very simple and effective.

Two things. 1. I tried it and the close button doesn't seem to be working. 2. After quickly inspecting the code, it appears as though the message will return every time you refresh or click a link to a different page on the site. Correct me if I'm wrong.

Any message that tells someone to switch browsers is too obtrusive.

I agree, which is why I've decided not to use that glorified web browser market overlay. That turned out to be rather annoying. At the very least, I would like to suggest, not demand.

-Neil

Link to comment
Share on other sites

  • 0

You don't want to support IE thats fine. Its your choice to make. But don't trash IE when you have 200+ errors in your code. Html markup is like instructions for the browser. If the instructions are incorrect how do you expect something following instructions to do what you wanted it to do ?

Sure I am going to say go south when I want somebody to go north and call it my style of directions. Then I am going to call people incompetent when they read my instructions and go south. Bravo !

Second.

Fix your own errors before you start pointing fingers.

Link to comment
Share on other sites

  • 0

It's funny when everyone is telling you to fix the errors to fit IE, and I run into MANY sites that only support IE and screw everyone else. The fact is that IE has never followed compliance to standards that other browsers do. I do try to fix errors in IE and Firefox and don't worry about other browsers, but I wouldn't go out of the way if I were you. You can NEVER please everyone. If it's important later, worry about it then. With any luck IE will actually get better in their compliance and you won't have to worry about it.

IE8 is standard compliant. 99% of HTML/CSS I write renders the same in IE8/Chrome/Firefox/Opera/Safari/...

It usually takes only a few more lines of CSS to adapt it for IE7. But IE6 is catastrophe and is best to forget about it unless you really have users with that browser. Then you will probably need a few hour to fix everything (including transparent PNGs).

Link to comment
Share on other sites

  • 0

Second.

Fix your own errors before you start pointing fingers.

The errors on my site are MOSTLY from the template creator I used. I have very few visual errors on my site which are not related to these errors. I am free to trash IE all I want and I will do it with or without fixing some errors that may or may not be directly responsible for the incompatibilities with IE.

Until IE even comes CLOSE to getting a high score at the Acid3 test, I have every right to ignore IE. If IE ever does pass the Acid 3 test, then great. That means I won't have to design around the flaws of IE. It's a win win situation for me. Now please, stop with these kinds of responses.

Link to comment
Share on other sites

  • 0

Wow, this is amazing. IE6 was a dog, 7 wasn't much better. 8 is hardly perfect but if your site has code errors, what do you expect?

Link to comment
Share on other sites

  • 0

What is the name of this template creator so people can avoid it in the future? or is it the changes you made to the template?

Link to comment
Share on other sites

  • 0

The errors on my site are MOSTLY from the template creator I used. I have very few visual errors on my site which are not related to these errors. I am free to trash IE all I want and I will do it with or without fixing some errors that may or may not be directly responsible for the incompatibilities with IE.

Until IE even comes CLOSE to getting a high score at the Acid3 test, I have every right to ignore IE. If IE ever does pass the Acid 3 test, then great. That means I won't have to design around the flaws of IE. It's a win win situation for me. Now please, stop with these kinds of responses.

Not interested in getting too involved in browser preferences (I still try to forget the 90s and the ridiculous Netscape brands adorning sites during the browser wars), but in an effort to at least be reasonable:

I didn't realize ACID3 represented current standards, and I believe an earlier complaint of yours was in regards to its standards compliance. Unless my understanding of ACID3 is incorrect, or your definition of standards in unconventional.

Link to comment
Share on other sites

  • 0

Wow, this is amazing. IE6 was a dog, 7 wasn't much better. 8 is hardly perfect but if your site has code errors, what do you expect?

So W3 spat out a bunch of errors, what does that really prove?

I can run a strict doctype and code in HTML4... I'll see plenty of errors all over the place.. So what does that prove? A lot of errors means the site is bad?

I have a website of mine that has 39 validation errors but guess what.. It works in IE7+, Gecko browsers and Webkit browsers... It's just pedantic mistakes (eg: defining an ID more than once, a missing alt tag, an ampersand not changed over to &) and do not affect the rendering of the website at all.

Sure his validation has a great number of errors but.. in the grand scheme of things, it's not something I'd put all my energy on using against him.

Link to comment
Share on other sites

  • 0

Most of those errors were created automatically by the template creator I used. I'm sorry. I'm not in the business of fixing the web. If it displays fine, that's all that matters to me. If there's something wrong with it, I will fix it. What I will not fix is something that is broken in internet explorer.

My website is one big experiment so it's my right to design it however I want. I started knowing nothing about html, css, javascript and php... and in the short amount of time that I've put into designing my website, I've made something that I think is really cool compared to a lot of what I've seen out there. Sure, my methods are a little unorthodox but that's only because I haven't read text books and learned convention and frankly, I don't care. I'll really take the time to learn that stuff when I feel like it. As for now, IE8 is not a good contender to the browser lineup, even if it does have a massive userbase. It gives me peace of mind to not support it and I laugh at people who get mad at it.

you're saying exactly the same thing IE apologists say. "if it displays fine i'm not going to bother with it" is the attitude that caused this whole mess in the first place. if you don't write valid code, then you're leaving the client to second guess what you intended, and that can have a huge range of erratic consequences. no browser acts well in quirks mode, just because it looks fine in Firefox doesn't mean Firefox is actually rendering it like it's supposed to. crappy code isn't unorthodoxy, it's flat out wrong. as long as your code has non-trivial errors, then any wrong rendering in any browser can be either the browser or your fault, you can't be certain it's actually IE's fault until your code is valid.

It's funny when everyone is telling you to fix the errors to fit IE, and I run into MANY sites that only support IE and screw everyone else. The fact is that IE has never followed compliance to standards that other browsers do. I do try to fix errors in IE and Firefox and don't worry about other browsers, but I wouldn't go out of the way if I were you. You can NEVER please everyone. If it's important later, worry about it then. With any luck IE will actually get better in their compliance and you won't have to worry about it.

there's many people who don't support IE, myself included, but we actually have a good reason for doing so. don't blame a browser for sloppy coding.

The errors on my site are MOSTLY from the template creator I used. I have very few visual errors on my site which are not related to these errors. I am free to trash IE all I want and I will do it with or without fixing some errors that may or may not be directly responsible for the incompatibilities with IE.

Until IE even comes CLOSE to getting a high score at the Acid3 test, I have every right to ignore IE. If IE ever does pass the Acid 3 test, then great. That means I won't have to design around the flaws of IE. It's a win win situation for me. Now please, stop with these kinds of responses.

the acid tests pick very specific parts of the specifications, arguably some of the most esoteric parts, with the goal of moving the web forward. it's a great measuring tool for standards compatibility, but far from general-purpose. even if IE passes the test, it doesn't at all guarantee that wrong code will be guessed in the same way in every browser. the only way you can ensure that your website renders properly in all clients that support the standards properly is by making your website standards compliant itself.

IE8, even 9 still sucks at some a lot of things, but you're fooling yourself if you think that it still can't render basic HTML & CSS properly in strict mode. Any actual problems with the engine will only be exacerbated by and confounded with your sloppy coding. This isn't a pedantic point of "you should do this or else you're a hypocrite", it could potentially have huge effects on the way your page is being displayed.

So W3 spat out a bunch of errors, what does that really prove?

I can run a strict doctype and code in HTML4... I'll see plenty of errors all over the place.. So what does that prove? A lot of errors means the site is bad?

I have a website of mine that has 39 validation errors but guess what.. It works in IE7+, Gecko browsers and Webkit browsers... It's just pedantic mistakes (eg: defining an ID more than once, a missing alt tag, an ampersand not changed over to &) and do not affect the rendering of the website at all.

Sure his validation has a great number of errors but.. in the grand scheme of things, it's not something I'd put all my energy on using against him.

errors mean that you're making the client guess what you want, sure in your case they pretty much all uniformly do a good job of choosing the right action, but when you look at his validation results, it has a huge number of things like:

document type does not allow element x here

end tag for element x which is not open

end tag for x omitted (and this isn't just the trailing slash either)

there is no attribute x

character x not allowed in attribute specification list (e.g. a semicolon within <>)

etc... (i stopped reading about a tenth the way through)

these aren't trivial errors.

Link to comment
Share on other sites

  • 0

The errors on my site are MOSTLY from the template creator I used. I have very few visual errors on my site which are not related to these errors. I am free to trash IE all I want and I will do it with or without fixing some errors that may or may not be directly responsible for the incompatibilities with IE.

Until IE even comes CLOSE to getting a high score at the Acid3 test, I have every right to ignore IE. If IE ever does pass the Acid 3 test, then great. That means I won't have to design around the flaws of IE. It's a win win situation for me. Now please, stop with these kinds of responses.

http://validator.w3.org/check?uri=http://www.logichaos.com/joomla/&charset=(detect+automatically)&doctype=Inline&group=0

If you fix a couple of those errors a lot of the others with disappear, and your site won't have as many issues in IE.

Link to comment
Share on other sites

  • 0

I really don't think this is a good idea. IE 8 is a "modern" browser. If you haven't coded it correctly to work for everything, why is it the users fault? The user shouldn't have to change their browser to suit your website.

Remember it's one of the guidelines for developing websites. I remember, it was drilled into me enough while studying a few courses :wacko:

Link to comment
Share on other sites

  • 0

91 errors running the CSS validator, these are probably whats causing your right column to not show up in IE.

http://jigsaw.w3.org/css-validator/validator?uri=http://www.logichaos.com&profile=css21&usermedium=all&warning=1〈=en.

you have a lot of browser specific code in there.

The parse errors are really what he needs to worry about here, and there's plenty of them.

I'm sorry. I'm not in the business of fixing the web. If it displays fine, that's all that matters to me. If there's something wrong with it, I will fix it. What I will not fix is something that is broken in internet explorer.

Internet Explorer 7+ is less broken than your site is.

Link to comment
Share on other sites

  • 0

91 errors running the CSS validator, these are probably whats causing your right column to not show up in IE.

http://jigsaw.w3.org/css-validator/validator?uri=http://www.logichaos.com&profile=css21&usermedium=all&warning=1〈=en.

you have a lot of browser specific code in there.

well all the vendor prefixed styles shouldn't do anything in ie

edit: took too long to look up the proper name of -vendor :p

Link to comment
Share on other sites

  • 0

So W3 spat out a bunch of errors, what does that really prove?

I can run a strict doctype and code in HTML4... I'll see plenty of errors all over the place.. So what does that prove? A lot of errors means the site is bad?

I have a website of mine that has 39 validation errors but guess what.. It works in IE7+, Gecko browsers and Webkit browsers... It's just pedantic mistakes (eg: defining an ID more than once, a missing alt tag, an ampersand not changed over to &) and do not affect the rendering of the website at all.

Sure his validation has a great number of errors but.. in the grand scheme of things, it's not something I'd put all my energy on using against him.

I feel sorry for the people hiring you.

Link to comment
Share on other sites

  • 0

So W3 spat out a bunch of errors, what does that really prove?

I can run a strict doctype and code in HTML4... I'll see plenty of errors all over the place.. So what does that prove? A lot of errors means the site is bad?

I have a website of mine that has 39 validation errors but guess what.. It works in IE7+, Gecko browsers and Webkit browsers... It's just pedantic mistakes (eg: defining an ID more than once, a missing alt tag, an ampersand not changed over to &) and do not affect the rendering of the website at all.

Sure his validation has a great number of errors but.. in the grand scheme of things, it's not something I'd put all my energy on using against him.

Errors have a great impact on rendering time. More errors, slower rendering.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.