SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Zealot ardit's Avatar
    Join Date
    Aug 2001
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simple code request

    Hi,
    I'm moving my topsite system so I want pople to know about it and register in the new. What code should I use to have a warning message pop-up giving some info and having a OK butoon that when cildked transfers users to the new homepage. The visitors shouldn't be able to do anything in the page where the script so they cannot use the old system.

    Thank you,
    Ardi

  2. #2
    SitePoint Guru okrogius's Avatar
    Join Date
    Mar 2002
    Location
    US
    Posts
    622
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Redirect to a temporary page that will inform the visitors. That can be done thorugh meta tages, or server side scripting.

    For example if you use php you can use:
    PHP Code:
    Header("Location: http://wwww.newsite.com/movingnotice.php"); 
    Then on that page inform your visitors and have an ahref to your new website.

  3. #3
    SitePoint Zealot ardit's Avatar
    Join Date
    Aug 2001
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know that I can do that but I wanted a warning box, it is imporatnatn that they register in the new system so that will grab more their attention.

  4. #4
    SitePoint Wizard dominique's Avatar
    Join Date
    Dec 2000
    Location
    orbis terrarum
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    JavaScript will do the trick:
    Code:
    <html>
    <head>
    <title>Site Moved! - Manual</title>
    </head>
    
    <body bgcolor="#FFFFFF" text="#000000">
    <script language="JavaScript">
    <!--
    function jsAlert() 
        {
            alert("Site Moved to www.yahoo.com!");
            window.location.href = "http://www.yahoo.com"
        }
    
    // -->
    </script>
    <a href="javascript:jsAlert()">Site Moved!</a>
    
    </body>
    </html>
    Or, if you want to dialog box to show up as soon as the page loads:
    Code:
    <head>
    <title>Site Moved! - Automatic</title>
    </head>
    
    <body bgcolor="#FFFFFF" text="#000000" onload="jsAlert()">
    <script language="JavaScript">
    <!--
    function jsAlert() 
        {
            alert("Site Moved to www.yahoo.com!");
            window.location.href = "http://www.yahoo.com"
        }
    
    // -->
    </script>
    
    </body>
    </html>
    Also, I'm moving this thread to the JavaScript forum for you.


Bookmarks

Posting Permissions

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