iFrame keeps opening a new windows onlick

Posted by bambinou, 11-06-2012, 11:29 AM
Hello, I am totally lost with this one. I have an affiliate booking iframe, I am trying to get this iframe to open all the inner links inside that frame but strangely, one page 1 it works but on the next page, when the user clicks on "book now" it goes on the affiliated website but should stay there. Any idea what is going on? I am adding the code of the affiliate below but will modify my ids... Please help, I tried to pass _blank, _self,_top in the url, only the first page is iframed with _self, the others pops up a new windows. Thank you, Ben

Posted by 1isuru, 11-06-2012, 01:01 PM
These are the methods use in iframe. _blank - URL is loaded into a new window. This is default _parent - URL is loaded into the parent frame _self - URL replaces the current page _top - URL replaces any framesets that may be loaded name - The name of the window window.open(URL,name,specs,replace) url - address name - above four methods. replace - Optional.Specifies whether the URL creates a new entry or replaces the current entry in the history list. The following values are supported: true - URL replaces the current document in the history list | false - URL creates a new entry in the history list

Posted by bambinou, 11-06-2012, 01:06 PM
Hi, Thank you, I have already tried these methods: _blank - URL is loaded into a new window. This is default _parent - URL is loaded into the parent frame _self - URL replaces the current page _top - URL replaces any framesets that may be loaded None of them work, no idea why. Only the )_self works for the first windows, then when people click on "book now", they are being sent on another page away from my website. It should not happen. Regards, Ben

Posted by zykko, 11-10-2012, 01:54 AM
did i understand it correctly that when a user clicks "book now" on iframed affiliate page your page is then replaced by affiliate booking page? that's probably because 2nd iframed page (loading on "book now" click) contains something like if (window.top!==window.self) window.top.location=window.self.location you have no control over this behavior. they want bookings to be made from their site not from within framed/iframed pages.

Posted by bambinou, 11-10-2012, 04:37 AM
Hi Zykko, Thank you for the reply. Yes you are right. I will just keep the affiliate as it is then :-) Thank you, Ben

Was dit antwoord nuttig?

 Print dit artikel

Lees ook

How to automaticaly download all files in a folder via FTP?

Posted by viettechorg, 05-07-2007, 03:41 AMHello there, I am having trouble with moving my files...

[php] Need advices on writing a counter script

Posted by kennethinvest, 09-22-2008, 06:04 PMhello, I would like to make a very simple couter...

Need PHP5 Developer for open source web game project

Posted by openwars, 01-16-2008, 04:54 PMHello hxxp://sf.net/projects/modulargaming is our...

EARHOST down!

Posted by davkiz, 08-29-2002, 03:54 AMWow now there's a surprise. It was bound to happen. Their...

File Integrity Check

Posted by taydu3000, 01-15-2008, 04:01 AMAre the following file from Cpanel? Cpanel just update...