1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need help with a bit of code

Discussion in 'Web Design' started by ajpis, Jul 26, 2014.

  1. ajpis

    ajpis Regular Member

    Joined:
    Aug 5, 2013
    Messages:
    242
    Likes Received:
    286
    Location:
    UK
    I only have basic coding knowledge so this may seem as a bit of a silly question for some people on here.

    This code redirects my visitors to another url after so many seconds

    Code:
    <meta http-equiv="refresh" content="0; url=http://mysite.com" />
    Can anyone help me adapt this piece of code so that it will open a new url in a new window instead.

    Thanks in advance
     
  2. pxoxrxn

    pxoxrxn Supreme Member

    Joined:
    Dec 21, 2011
    Messages:
    1,397
    Likes Received:
    2,066
    • Thanks Thanks x 1
  3. Panther28

    Panther28 Elite Member

    Joined:
    May 2, 2010
    Messages:
    2,268
    Likes Received:
    3,405
    Occupation:
    Internet.
    Location:
    Internet.
  4. Standard Toaster

    Standard Toaster Regular Member

    Joined:
    Aug 29, 2009
    Messages:
    335
    Likes Received:
    190
  5. ajpis

    ajpis Regular Member

    Joined:
    Aug 5, 2013
    Messages:
    242
    Likes Received:
    286
    Location:
    UK
    I really appreciate all the quick answers, just in case anyone else ever needs to know I had to replace the code with the following:

    Code:
    <script type="text/javascript">window.open('http://mysite.com');</script>
     
  6. Flask

    Flask Jr. VIP Jr. VIP Premium Member

    Joined:
    Apr 7, 2014
    Messages:
    133
    Likes Received:
    17
    You should also set a timer for this code to open a new windows in certain seconds.
     
  7. mrtruehybrid

    mrtruehybrid Registered Member

    Joined:
    Aug 4, 2013
    Messages:
    56
    Likes Received:
    16
    <meta http-equiv="refresh" target="_blank" content="0; url="yoururl" />
     
  8. SharkServers

    SharkServers Regular Member

    Joined:
    Jun 29, 2014
    Messages:
    380
    Likes Received:
    181
    Occupation:
    Web Hosting
    Location:
    DMCA? Pff! www.SuckMyBallsDM.CA
    Home Page:
    JavaScript might not be enabled for everyone (for most people it is, though)