Forum Moderators: open
My page consists of one file called "home.htm", which is a static html page. On this html page there is an iframe which links to another file on my web site called "stats.php", which is a big php file, and I'd rather not go near this.
The I frame is used to display "Latest gallery additions" from my gallery. The stats.php file generates the ten newest files from my gallery in a simple thumbnail format. Now, the problem is - when I click on one of the thumbnail pictures, it opens in the iframe. What I want it to do is have these links open in the "home.htm" page (which contains my iframe).
Now, let's assume I don't have access to the stats.php page the iframe is linking to (I do, but it's a big long complex php script which I really don't understand).
How do I set the target of the whole iframe itself, so that any links within simply open on the "top" page rather than within the iframe? I've tried simply adding a "target="_top"" onto the iframe tag, but obviously this doesen't work! I've done a lot of google searching, but I can't make head nor' tail of it all - all I can gather is I'll probably need some java script. My HTML knowledge is somewhat basic, but I know nothing regarding javascript.
Any help would be much appreciated, and if further clarification of what I'm blabbering about is required just ask.
Finally, my apologies for including a link in my previous post. I can understand why descriptions rather than links to an example are preferable, and I hope this post confines to your forum charter.
Thanks,
Cian
Thanks for the help.
Have you tried
target="_parent" already? This may be a better choice for the links in the iframe document. You will need to add this within the stats.php page, as it is this file which generates the HTML for the iframe. Without knowing how the document is written it is difficult to be very specific, but you will have to find where either the
head section is created (for the base target... syntax as suggested above) or where the links are generated so you can add the target attribute to them.