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

Ha estat útil la resposta?

 Imprimeix aquest Article

Llegir també

Traffic overusage

Posted by Salar, 01-14-2008, 03:59 PMhi, i have an VPS account at SolarVPS. I have had some bad...

When blog works forums stops working and viceversa

Posted by sash_007, 03-10-2010, 08:47 PMHello friends, I am having a weird problem my problem is...

Set up file that will be called up in cron

Posted by ninak, 03-09-2010, 10:10 AMI am kind of embarrassed asking this question but I hope...

Where can i use command line instead of gui in cpanel?

Posted by sash_007, 03-09-2010, 08:46 AMHello friends, Just wondering whether i can use...

Database design question: Indexing

Posted by phoqoo, 01-15-2008, 12:38 PMFrom what I've read, indexing columns helps optimize DB...