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:
    251
    Likes Received:
    315
    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,398
    Likes Received:
    2,073
    • Thanks Thanks x 1
  3. Panther28

    Panther28 Jr. VIP Jr. VIP

    Joined:
    May 2, 2010
    Messages:
    2,886
    Likes Received:
    3,882
    Occupation:
    Internet.
    Location:
    Internet.
    Home Page:
  4. Standard Toaster

    Standard Toaster Regular Member

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

    ajpis Regular Member

    Joined:
    Aug 5, 2013
    Messages:
    251
    Likes Received:
    315
    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 Junior Member

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

    mrtruehybrid Regular Member

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

    SharkServers Jr. VIP Jr. VIP

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