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

Kas see vastus oli kasulik?

 Prindi artikkel

Loe veel

let ppl play an mp3 but not let them access the file

Posted by bambinou, 11-10-2012, 09:32 AMHi, I have a folder with many mp3s, I do not want...

[PHP] - Why forums don't use $_SESSION variables ?

Posted by hadoken, 03-13-2007, 02:46 PMHello, I hope everybody is fine. I take a look on some...

[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...

How-To: PHP bbCode Function // Intermediate

Posted by JustinSmall, 09-21-2008, 03:49 PMIt wouldn't let me post this is the tutorial section,...

Command for tranferring files through wget

Posted by ramdak5000, 07-16-2007, 10:24 PMI am trying to move over a client from Verio's hosting...