Results 1 to 7 of 7

Thread: How do i keep pages in my iframe.

  1. #1
    Join Date
    Nov 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How do i keep pages in my iframe.

    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.

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    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:
    HTML Code:
    <a href="http://www.google.com" target="_blank">Link</a>
    Change it to this:
    HTML Code:
    <a href="http://www.google.com">Link</a>

  3. #3
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Btw, if that doesn't work then you might have this tag:
    HTML Code:
    <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.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

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

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Quote Originally Posted by mimi86uk View Post
    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.

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by mimi86uk View Post
    I can open my eccommerce pages in the iframe fine
    Quote Originally Posted by Snookerman View Post
    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

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

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •