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 7 of 7
  1. #1
    New Coder
    Join Date
    Feb 2004
    Location
    Manitoba, CANADA
    Posts
    72
    Thanks
    0
    Thanked 0 Times in 0 Posts

    open web page depending on user's internet access

    Hi. Some of the users on our network do not have internet access. Is there a way to have one web page open for those users with internet access and another web page open for those without internet access?

    Thanks!

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    And how exactly do you expect that page to be opened for the ones without internet access? How will they recieve updates. Can you communicate with their computers through the network?
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    May 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yup, all you have to do is use something to check the ip (php is the most reliable way), and then either write the page depending on weither the ip is internal or not, or redirect them to the specific version.

  • #4
    New Coder
    Join Date
    Feb 2004
    Location
    Manitoba, CANADA
    Posts
    72
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The site is accessible internally for all. I want to add some information to the site (for example, daily weather, news, etc.) that is only accessible to users that have access to the Internet however I know that for users without Internet access, this can be irritating. Therefore, I want to create 2 separate home pages; one home page with the bells and whistles for the lucky with external access and one for the internal folk who need to get the news and weather from their neighbour. I want the appropriate page to be available to them when they open their browser without prompting the user to pick which site they want to access (no point picking the one with internet access when you don't have it).

    Thanks.

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Okay is the intranet mainly based on using Internet Explorer? You can try something like this
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    <script type="text/javascript">
    function doConnect()
    {
    window.location = "internetbasedsite.html";
    }
    function doNoConnect()
    {
    window.location = "noninternetbasedsite.html";
    }
    var i = new Image();
    i.onload = doConnect
    i.onerror = doNoConnect;
    i.src = 'http://www.internet.com/someimage.gif?d=' + escape(Date());
    </script>
    </head>
    
    <body>
    </body>
    </html>
    If the image loads successfully then it will redirect the user to the internet based page. If the image fails to load then it will direct the user to the noninternet page. Since browsers cache images I've added on the date to the image so the browser things its a new image.
    Last edited by _Aerospace_Eng_; 05-02-2006 at 07:24 PM.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #6
    New Coder
    Join Date
    Feb 2004
    Location
    Manitoba, CANADA
    Posts
    72
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes. It is a managed environment. Everyone has the same software but some users have different access rights (ie. internet access - externally). Everyone has IE for a browser (which is the standard).

  • #7
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    I edited my post, if you are able to set the same homepage for everyone then the above should do what you want. Just use your own image that is somewhere online.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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