Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Oct 2011
    Posts
    44
    Thanks
    7
    Thanked 0 Times in 0 Posts

    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

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,919
    Thanks
    6
    Thanked 1,040 Times in 1,013 Posts
    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.

  • #3
    New Coder
    Join Date
    Oct 2011
    Posts
    44
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Stephan - thank you.

    I added the following as you suggested, uploaded the script in a separate .js file, but it didnt work.

  • #4
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    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
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #5
    New Coder
    Join Date
    Oct 2011
    Posts
    44
    Thanks
    7
    Thanked 0 Times in 0 Posts
    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.

    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.

    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.

  • #6
    Kor
    Kor is offline
    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
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •