-
link to current iframe url to target=top
I have a page that has links at the top to my frequently visited websites. On the bottom half of the page I have google inside of an iframe. You can search with google and all the results and new pages open in the iframe. I want to make a link that will open the current url of the page inside of the iframe and display it and only it. basically it will make my links disappear and whatever was in the iframe will be displayed free of being in an iframe. hopefully...
Thank you
James
-
-
An iframe is a separate page that happens to be displayed in the same window. You cannot control an iframe from it's parent, only from its internal code. If you do this for an external website (like google), then you can't control what code is on the page and what that code does.
The only possible option would be to try to disable the iframe and place an event listener for the iframe itself, but this is only theoretical as I have never heard about such a method. It would basically disable any normal interaction in the page and instead do a function when, for example, you click within the bounds of the iframe. However, then associating that click with an action (like loading a url) would be difficult.
The only other option would be to attach an event listener to the iframe changing locations, but I don't think this exists either. In theory if that does, then you could redirect the main page to the url rather than the iframe (or, actually, in addition to the iframe), but that's messy and probably not possible.
One approach with this would be embedding google into your site, such as with the google custom search. If that works for your purposes, then you could avoid the complexity.
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
-
The Following User Says Thank You to djr33 For This Useful Post:
-
Thank you. That's all I needed to know. I've worked with HTML for a while but I'm not an expert by any means. I can do some basic coding and with a little help from Dreamweaver I can put together small sites.
Embedding google was my next step. The page just looks better with google in an iframe but functionality wins.
Thank you for your help.
-
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