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

Javascript -> opening a new separate page

Discussion in 'HTML, Graphics & Programming' started by ultim, 4 May 2006.

  1. ultim

    Hitman

    Joined: 6 Jan 2006

    Posts: 983

    Location: Midlands

    Hi!
    ive created a link using javascript to open a new page when the user clicks on it using the code "window.open".

    The problem im having is when i click on the link it opens a the new page but when i click on a link again, it just refreshes the exisiting page! i want it to open another brand new page!

    Is it possible? if so how!
     
  2. ClearChaos

    Associate

    Joined: 8 Oct 2005

    Posts: 97

    Location: Bristol

    bit easier to use something like this

    < a href="apage.htm" target="_blank">your link text</a>

    that will open a new window everytime and you dont need to worry about people having javascript turned off either
     
  3. ultim

    Hitman

    Joined: 6 Jan 2006

    Posts: 983

    Location: Midlands

    Only reason i chose to use javascript is it allows me to set the page size and remove any toolbars.