I need help on how to break my web page out another web sites frames. But the code I find online doesn't address what I am doing. I am posting ads to a classified web site that ranks high when placing ads on their web site. If I post an ad on the site though when someone clicks on the link the affiliate site I send them to is still within their frames. I'm not sure if that is keeping me from getting the affiliate commission when someone buys the product. So I need to code to break out of the frame but redirect it to a specified affiliate webpage. Can this be done? Or do I need to do a 2 step approach in which I would have to have the page breakout and then just have my customer land on one of my pages and then have them click on a 2nd link to go to the affiliate site? I really don't want to do this though as it may end up costing me sales by not having the redirect as a seamless operation. Any help would be appreciated... Thanks, Ted
<a href="SamePageURL.html" target="_top"> Click break out </a> Code (markup): or <a href="http://affilpage.com" target="_top"> Click here to go to the affiliate and break out </a> Code (markup):
The problem, if I understand correctly, is that the classifieds website is displaying your site within a frame. Visitors navigate through your site within this frame and at some point (some) click on an affiliate link. Unfortunately though they are still in a frame which is essentially on the classifieds website. If you have an affiliate link with a personal code in it then it shouldn't make any difference. If you get affiliate commissions for all visitors where the referrer is your url then it is a major problem. A two step approach need not create any problems. If you get out of the frame straight away as soon as someone reaches your site then they will be free to click on an affiliate link directly within your site ensuring you are appropriately recognised as the affiliate. The following code when inserted into the head section of a html document should I believe keep any site out of frames <SCRIPT="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT"> if (top.location != self.location) { top.location.replace(self.location) } </SCRIPT> Code (markup):
I don't think these codes shown above will work with the problem I am having? The first soultion is to use the a href attribute to pull up another page. I tried that but all that does on this website is open another web page but still in their frame. The second solution would work if I was only trying to break out of the frame to have someone land on one of my web pages. But I want to break out of the frame -- and then do a redirect to another affiliate web site. So my site is www.mysite.com which is enclosed in the classified web sites frames. I want to breakout to one of my pages eg. www.mywebsite.com/redirectlink.htm which sends my lead to the affiliate site. Can this be done? I've searched the web and can only find examples like shown here so far. Thanks, Ted
The idea was that as soon as a visitor reaches you site they break out of frames. You would then not need to do anything special to send them to the affiliate link. I guess the below might work. I haven't tested it though. <SCRIPT="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT"> if (top.location != self.location) { top.location.replace("affiliate_link_goes_here") } </SCRIPT> Code (markup):