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?
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"??
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?
<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
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?
You are a diamond!! Just used that code and added in a bit for the current window and it seems to work a treat!! <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!!