Html Coding Help

Discussion in 'HTML & Website Design' started by influx08, Jan 13, 2009.

  1. #1
    I have got a code for when someone clicks on an external link on my website, a new page opens in a new window but also in the same page it redirects to another page on my site.

    Problem is, the page that opens in the new window is seen by my browser as a pop-up and blocks it.

    The external link is not a pop-up in anyway and if i have it without the redirection in the same page it appears fine

    Does anyone know of a way round this?
     
    influx08, Jan 13, 2009 IP
  2. phone00x

    phone00x Guest

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    same with my question...friend's. Thank's.
     
    phone00x, Jan 13, 2009 IP
  3. Kortez

    Kortez Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    <a href="new.html" rel="external">Open New Page On New Window</a>
     
    Kortez, Jan 13, 2009 IP
  4. influx08

    influx08 Guest

    Messages:
    72
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Eh?

    The code i currently use is...

    <a href="page1.html" target="_blank" onclick="window.location = 'page2.html'">Click</a>

    Which works whereby page 1 opens in the new window and the current window is directed to page 2

    The problem is that page 1 is blocked as it is viewed as a pop-up

    What does the rel= tag do? Is that similar to target="_blank"??
     
    influx08, Jan 13, 2009 IP
  5. crath

    crath Well-Known Member

    Messages:
    661
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    100
    #5
    i tried your code and it opens page2 in the current tab and page1 in a new tab

    what else would you like it to do?
     
    crath, Jan 13, 2009 IP
  6. kazanova_ks

    kazanova_ks Active Member

    Messages:
    99
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    93
    #6
    <A onclick="window.open(this.href);return false"
    href="yourhtmlfile.htm"><IMG src="image1.gif" border=0></A>

    this is for image try to modify for text maybe it will help
     
    kazanova_ks, Jan 13, 2009 IP
  7. influx08

    influx08 Guest

    Messages:
    72
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Yes it works a treat i know that but when its on my website and i click on it, my browser thinks that page 1 is a pop-up and blocks it.

    I dont want it to be blocked - is there any code which i can use which will in effect tell the browser that this is important and its not a pop-up advert which needs to be blocked?
     
    influx08, Jan 14, 2009 IP
  8. influx08

    influx08 Guest

    Messages:
    72
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    You are a diamond!!

    Just used that code and added in a bit for the current window and it seems to work a treat!! :D

    <A onclick="window.open(this.href); window.location = 'Page1' ; return false "
    href="Page 2"><IMG src="images/" border=0></A>

    Thanks very much that is brill!!
     
    influx08, Jan 14, 2009 IP