Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-13-2012, 05:35 PM   PM User | #1
NicolaHWS
New Coder

 
Join Date: Jul 2012
Posts: 15
Thanks: 2
Thanked 0 Times in 0 Posts
NicolaHWS is an unknown quantity at this point
Alert box - can it be loaded each time the page loads?

Hi

I'm making a website for a local enterprise charity, the working copy of which can be found here: www.youthenterprise.co.uk/newhullready/coded

no matter what I do, the navigation doesn't work in ie7 (I have consulted a programmer friend who doesn't get it either) so I'm having to launch the website with an alert box which pops up when the user is using ie7, warning them that their browser is not supported. It worked the first time I loaded the page using ie7 but doesn't do it after the first time you click ok. The problem is a lot of their traffic will come from schools and other instititions where multiple users will be using a computer so I need it to pop up every time someone tries to view it on ie7, even if they've clicked ok before.

This is the javascript code I'm using:
Quote:
<!--[if IE 7.0]><script language="JavaScript">

function WelcomeMSG ()
{
alert("Welcome to Hull Ready - the future is ours.
Unfortunately this website can no longer support the browser Internet Explorer 7. All other browsers, including Internet Explorer 8 and above are supported.")
}

</script>

<onLoad="WelcomeMSG()">
<![endif]-->
Please help, I'm new to javascript and jquery coding!
NicolaHWS is offline   Reply With Quote
Old 10-13-2012, 08:49 PM   PM User | #2
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,100
Thanks: 197
Thanked 2,421 Times in 2,399 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
Here you are (place in the <head>):-

Code:
<!--[if IE 7.0]>

<script type = "text/javascript">

alert ("Welcome to Hull Ready - the future is ours.\nUnfortunately this website can no longer support the browser Internet Explorer 7.\n All other browsers, including Internet Explorer 8 and above are supported.")

</script>

<![endif]-->
Quizmaster: Which of these two boats is a palindrome - kayak or canoe?
Contestant: Canoe.
__________________

All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
Philip M is offline   Reply With Quote
Old 10-14-2012, 05:53 PM   PM User | #3
NicolaHWS
New Coder

 
Join Date: Jul 2012
Posts: 15
Thanks: 2
Thanked 0 Times in 0 Posts
NicolaHWS is an unknown quantity at this point
Thank you very much, that did the trick!

Thanks again
NicolaHWS is offline   Reply With Quote
Old 10-14-2012, 06:12 PM   PM User | #4
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,697
Thanks: 5
Thanked 875 Times in 850 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Sorry to chime in but I see no reason why the navigation shouldn’t work in IE 7. It doesn’t look overly complex to me, on a short glimpse with a modern browser.

Also, on another note: You forgot to specify a general page background color. People can set their own browser background, text, and link colors in their browser settings so you shouldn’t rely on the default white being set everywhere. I have only noticed this because I have a light yellowish default browser background, and the graphics with the white background look out of place to me. Always set a background color on the html or body element.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 10-14-2012, 08:00 PM   PM User | #5
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,100
Thanks: 197
Thanked 2,421 Times in 2,399 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
Quote:
Originally Posted by VIPStephan View Post
Sorry to chime in but I see no reason why the navigation shouldn’t work in IE 7. It doesn’t look overly complex to me, on a short glimpse with a modern browser.
Agreed, but I don't have IE7 to test it, so must rely on what the OP claims.
__________________

All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
Philip M is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:40 AM.


Advertisement
Log in to turn off these ads.