Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Another Iframe Problem

  1. #1
    Join Date
    Jul 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Another Iframe Problem

    hi guys dont know if any1 can help me I have looked everywhere but cant seem to find the answer.

    I have a site that is based on the shopping cart cubecart.

    I have an iframe on 1 of the pages which displays certain search results.

    however when i click of the items that are in the iframe they load up inside the iframe and i need them to load in the main window. I have read that I need to use the target="_top" of the links but since they are all compiled using php code im not sure how to do this.

    Is there a way of just telling the iframe that any links inside it should be opened in the "_top" ?

    Thanks guys

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    In the head section, I believe you should be able to use this tag:
    <base target="_top">

    [Edit: Corrected from 'href' to 'target'.)
    Last edited by djr33; 07-18-2007 at 10:51 AM.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Jul 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No i still loads in the iframe not in the main window?

    I added

    <base href=www.healthier-options.com/sports/"_top">

    to the head section on the page that loads in the iframe is that correct?

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    No....

    Just exactly what I had.

    _top is the top level of the current page, relative, so you don't need to specify a URL.
    And even if there were a need to have a URL, it would go in the quotes.
    For html, you always need <tag property="value">, not <tag property=value>, or some version of that.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Jul 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    http://www.healthier-options.com/spo...ewDoc&docId=64

    this is the page you can see the iframe at the bottom.

    an example of the link in the frame is

    http://www.healthier-options.com/spo...d&productId=30

    but if I do what u sugested (<base href="_top">)

    then the links become (http://_top/index.php?act=viewProd&productId=30)

    even then i only opens in the iframe and just says page cannot be displayed

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Oh!

    Sorry about that. You're right.

    It should be <base target="_top">

    I was thinking of the wrong property. But, hey, if you need to specify a base href, now you know
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #7
    Join Date
    Jul 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    sorry its still not workin. do i put this in the page that contains the iframe of the page that loads in the iframe? the <base target="_top"> means that all the links are now back to normal but they still only load inside the iframe?

    Am I doin sumthing stupid?

  8. #8
    Join Date
    Jul 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    sorry mate this is very strange.

    I put just a normal <a href link n the page and when u click it it opens in the top window. However all the other links dont. Is it to do with them being complied through php rather than being a normal link?

  9. #9
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    The base tag sets a default for the page.

    target="_self" on those links is overriding the base target.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  10. #10
    Join Date
    Jul 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    yea i had a look in the source and your right they all have a target="_self" command on every link.

    But I dont know where the link is complied from so I cant turn the ="-self" to ="-top"

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
  •