Go Back   CodingForums.com > :: Client side development > HTML & CSS

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 11-22-2011, 12:03 PM   PM User | #1
mnkhaki
New Coder

 
Join Date: Oct 2011
Posts: 44
Thanks: 7
Thanked 0 Times in 0 Posts
mnkhaki is an unknown quantity at this point
Internet Explorer Calling/Invoking a Function

I hate IE. Its complicated and stubborn.

So I want visitors on our site to be redirected using a pop-up saying "you're using an unsupported browser". I found a great way to do this on the following site:

http://jreject.turnwheel.com/

I don't know much about JQuery - but I want to implement what this site offers on mine.

Would anyone be kind enough to explain how to get this done? In other words, do I save the file (code) in a separate file - and then "call" it from the index page? If yes, how?

My sites: www.jafferyacademy.org/index-beta.php and www.mombasajamaat.org/index-beta.php
mnkhaki is offline   Reply With Quote
Old 11-22-2011, 12:14 PM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,600
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
You incude/call separate JS files with a script element, preferably in the document head but possible is anywhere in the document.
Code:
<head>
…
…
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.reject.min.js"></script>
…
</head>
Be aware of the dependencies of the specific script.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 11-22-2011, 12:39 PM   PM User | #3
mnkhaki
New Coder

 
Join Date: Oct 2011
Posts: 44
Thanks: 7
Thanked 0 Times in 0 Posts
mnkhaki is an unknown quantity at this point
Stephan - thank you.

I added the following as you suggested, uploaded the script in a separate .js file, but it didnt work.
mnkhaki is offline   Reply With Quote
Old 11-22-2011, 12:55 PM   PM User | #4
Kor
Red Devil Mod


 
Kor's Avatar
 
Join Date: Apr 2003
Location: Bucharest, ROMANIA
Posts: 8,478
Thanks: 58
Thanked 379 Times in 375 Posts
Kor has a spectacular aura aboutKor has a spectacular aura about
Quote:
Originally Posted by mnkhaki View Post
I hate IE. Its complicated and stubborn.

So I want visitors on our site to be redirected using a pop-up saying "you're using an unsupported browser".
I am not a MSIE fan, but what you intend to do is both silly and in loser. Like it or not, IE remains the main browser, with 54% of share market, which means you will loose half of the possible visitors for your site. After all, which people uses which browser is not your concern.

On the other hand, if you are coding carefully and, if necessary, you are using some simple cross-browser workarounds, you can create a site which should look and behave the same in all the browsers. No need for silly pop-up messages, nor for redirection toward separate web documents.

Quote:
Originally Posted by mnkhaki View Post
I don't know much about JQuery - but I want to implement what this site offers on mine.
If so, start learning how to use JQuery. Make sure you have learned JavaScript, first.
__________________
KOR
Offshore programming
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Kor is offline   Reply With Quote
Old 11-23-2011, 04:39 AM   PM User | #5
mnkhaki
New Coder

 
Join Date: Oct 2011
Posts: 44
Thanks: 7
Thanked 0 Times in 0 Posts
mnkhaki is an unknown quantity at this point
Quote:
Originally Posted by Kor View Post
I am not a MSIE fan, but what you intend to do is both silly and in loser. Like it or not, IE remains the main browser, with 54% of share market, which means you will loose half of the possible visitors for your site. After all, which people uses which browser is not your concern.
Kor - thankfully we are not a business as such - just a school that has mainly parents & students visit the site. The pop up was intended to encourage chrome as a primary choice, but not make it mandatory.

Quote:
On the other hand, if you are coding carefully and, if necessary, you are using some simple cross-browser workarounds, you can create a site which should look and behave the same in all the browsers. No need for silly pop-up messages, nor for redirection toward separate web documents.
I agree - I should be able to get that, but sometimes it just becomes annoying. Although, with the new web design, I do not seem to have much problem so I can see that having a pop up may not be necessary after all.

Quote:
If so, start learning how to use JQuery. Make sure you have learned JavaScript, first.
Any (reliable) web tutorials you can recommend for javascript and jquery "lessons"?

Thanks again.
mnkhaki is offline   Reply With Quote
Old 11-23-2011, 09:58 AM   PM User | #6
Kor
Red Devil Mod


 
Kor's Avatar
 
Join Date: Apr 2003
Location: Bucharest, ROMANIA
Posts: 8,478
Thanks: 58
Thanked 379 Times in 375 Posts
Kor has a spectacular aura aboutKor has a spectacular aura about
http://www.w3schools.com/jquery/default.asp
http://docs.jquery.com/Tutorials
http://www.learningjquery.com/
__________________
KOR
Offshore programming
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Kor 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 02:46 AM.


Advertisement
Log in to turn off these ads.