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

¿Fue útil la respuesta?

 Imprimir éste Artículo

Leer también

Get stats out of Cs, Bf2, Quake and others

Posted by ExobiT, 09-23-2008, 12:14 AMHi, if i have some gameservers with quake, cs, css bf2, and...

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

Redirecting a subdomain to a folder on the main domain?

Posted by Max Renn, 11-12-2012, 02:46 AMHi all I hope someone can help me with this. Do any...

Sending commands to a socket (C++)

Posted by LindonNetworks, 09-19-2008, 05:53 PMI'm trying to write an SMTP wrapper and I'm...

problem when set up dhcp server

Posted by tinhnho, 07-17-2007, 04:43 PMI follow instruction from redhat to setup my Centos acts...