View Full Version : control what goes into iframe from a page without iframe
Hi, I have two pages, one with iframe, one without. I dont know how to control what goes into the iframe from the page without. If anyone can help me it will be very very helpful
03-07-2005, 04:48 PM
Do you mean you have an iframe (page a) within a page (page b) and from page b you want content to load from page a via links from page b??? (are ya keeping up??!) ;)
If this is the case you would link as normal but target the content to load in the iframe e.g.
<a href="pagea.htm" target="iframe">Link</a>
Hi, sorry i didnt make it clear enough
say theres 3 pages, a, b and c
page 'c' lies within the iframe of page 'b'
i was wondering if i would be able to control what goes into the iframe of page 'b' from a separate page 'a', without page 'a' being on the same page as page 'b' or 'c' (page a acting like a splash page)
hope thats a bit clearer
I've added a picture to try and make it a bit clearer
03-13-2005, 02:33 PM
I am pressuming that you want to have Page b loading after page a.
Just make a link as normal to page b and then specify what you want to be loaded in your Iframe
So on page a you would have
and then on page b for instance
<iframe width=350 height=300 src="pagec.htm" align=right frameborder=0 hspace=10
vspace=10 scrolling=auto name=Iframe></iframe>
the src="Your content here" is where you would specify what page you want to load.
Am I on the right track here?
kinda but not quite,
i want to be able to change what i'm able to load into the frame from page a
say i want to try and load a page d,e or f all from page a based on dfft links
instead of having a fixed page c all the time
is there neway of doing that?
03-15-2005, 07:39 AM
The way to do it is give your iframe, it is on page b, a name:
<iframe name="fred" src="pagec.htm" the rest of your iframe's attributes go here></iframe>
Then on page a your links look like this:
<a href="paged.htm" target="fred">Display Text or Image for Link</a>
Works the same with frames. If page b is not open though, the link from page a will open a new window to display the new page. So, in the body tag of page a, you might want to put:
03-25-2005, 06:26 PM
Sorry for the delayed reply.
The only way I can think is to control it from different links on page a although it would mean building a lot of different pages so when it linked from a to b, c would be different. Would it not be easier to let the user control what they want to see from links on page b? It sounds like you are making a lot of work for yourself...
03-25-2005, 07:19 PM
The only way I can think is to control it from different links on page a although it would mean building a lot of different pages so when it linked from a to b, c would be different.That would be the only reliable way if no server-side processing is available. However, is a language such as PHP or JSP is available, it's relatively simple to generate a page that changes the frame content based on a value in the query string.
If this is not for the Web in general, you could also get away with analysing the query string using a client-side script and having that create the frame with unique sources.
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.