View Full Version : How do i keep pages in my iframe.
mimi86uk
11-23-2008, 05:16 PM
Hello, im new and im having severe problems with my website design.
I have an iframe on my websites index.page, that opens product pages from another site, an eccommerce site i was using to build my online shop. I know i could of done this a different way!!!
My problem is that I can open my eccommerce pages in the iframe fine, but when i click a link on that eccomerce page (in the iframe) the link opens as a page all by itself, and to get back to my index page i have to click back.
How can i get the links within the iframe to open within the iframe.
The eccommerce site im using, does let me customise but to an extent.
I can apply codes on all the pages as a css style template, but it would be the same code for every page as it doesnt let me customise each page individually.
Yes i know i could of used cube cart and this and that, but my funds are limited and my html knowldege is ok but im no pro!!!
I used store2go, cus it was cheap and easy...
Ive read other threads but they werent helpfull, i need a html or css code.
Can somebody help please? Im desperate.
Snookerman
11-23-2008, 06:32 PM
What you need to change is the "target" attribute of the anchors. They are most probably set to target="_blank" now, which cause the link to open in a new, blank, page. What you instead need is target="_self" which is also the default, so removing all target attributes would do it. As far as I know there is no way to do this with css, you have to edit the html files. So if your link looks like this:
<a href="http://www.google.com" target="_blank">Link</a>
Change it to this:
<a href="http://www.google.com">Link</a>
Snookerman
11-23-2008, 06:41 PM
Btw, if that doesn't work then you might have this tag:
<base target="_blank">in your head section. This decides the target for all anchors that do not have a target value. Remove that one as well.
jscheuer1
11-24-2008, 10:24 AM
Sounds like the ecommerce site has code on it to 'bust out of frames'. If that's the case, and you cannot edit the javascript of those ecommerce pages, then there is nothing you can do about it other than turning off javascript in your browser, which of course will have no effect for other users, most of which will have javascript enabled.
Further, if that's what's happening, it is more than likely that the terms of service for the ecommerce site state that you are not allowed to put it in a frame or iframe. If that's the case, we aren't allowed to help you break them.
Snookerman
11-24-2008, 11:53 AM
I can open my eccommerce pages in the iframe fine
She wouldn't be able to do that if there was a code to bust out of frames would she? I think there must be a target _top or _blank value.
jscheuer1
11-24-2008, 02:46 PM
I can open my eccommerce pages in the iframe fine
She wouldn't be able to do that if there was a code to bust out of frames would she? I think there must be a target _top or _blank value.
Well from what is said there (in her entire post) it isn't entirely clear. If it is exactly as she literally describes it, then it would probably be target=_top or _parent (_blank would open a new page and hitting back would not take her back to her, or any page - she had also mentioned doing that).
However, either of those can be achieved in several ways, one subset of which are various javascript methods. Or, as I thought, it might be a frame busting script and she just didn't explain things clearly.
Even if it is just in the HTML target of the links or the base target of the page(s), if she can't edit that part, it may as well be a frame busting script, even worse in a way because at that point even turning off javascript will not work to keep the pages in the iframe once a link on them is clicked.
@mimi86uk
Please post a link to the page on your site that contains the problematic code so we can check it out.
Snookerman
11-24-2008, 03:11 PM
@jscheuer
Yeah, I meant _top or _parent not _blank of course. I still don't think it's a busting script, not a very successful one anyway if it doesn't bust out directly.
@mimi
I'd like to see the site, but if you cannot edit the "eccommerce" part then I don't think you can do anything about it. Removing target values cannot be done with css and turning off js is not very useful. But still, post a link to the site, fresh eyes might see things differently.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.