-
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
-
-
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
-
-
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?
-
-
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
-
-
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
-
-
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
-
-
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?
-
-
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?
-
-
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
-
-
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"
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks