targeting iframes

admin

Administrator
Staff member
If anyone at were-here.com can help i would be most grateful. <br />
<br />
I feel this is a simple problem, but i'm not experienced with HTML. <br />
<br />
My Question: <br />
<br />
(Note: There are three seperate .htm files: index, content and navi. "CONTENT" and "NAVI" are loaded into iframes on "INDEX". <br />
<br />
How can i target an "iframe" (name="content") to load in different content files by clicking on image map buttons from within a second "iframe" (name="navi") on a ("index") page. <br />
<br />
Basically how do i get one iframe to load in content into another. <br />
<br />
<br />
Can anyone help?......please!...........please! <br />
<br />
NB: if not, could you point me in the right direction!!!<!--content-->You're almost there - you've given the <iframe>s names, and mentioned the magic word - 'target' - have you tried setting the target attribute of each <area> tag to "content"? Try that...<!--content-->Many thanks for your reply,<br />
<br />
i've tried, but it still doesn't work.<br />
<br />
THE SETUP OF PAGES: <br />
<br />
I've targeted the iframe name="contentframe" in the index page to load href=http://www.htmlforums.com/archive/index.php/"contentstudio.htm" via src="contentstudio.htm".<br />
<br />
The area map button with the link ("href=http://www.htmlforums.com/archive/index.php/"contentcontact") and target ("contentframe") is in a file called "bottomnav.htm". This file is then loaded into an iframe name="bottomnavi" on the INDEX page via src="bottomnav.htm.<br />
<br />
(NB The link is in a file being loaded in to the index page. But i want to target iframe ("contentframe") in the INDEX page, FROM this file being LOADED into iframe ("bottomnavi") ON THE index page.)<br />
Can it be done?<br />
---------------------------<br />
The problem i find is that targeting the iframe ("contentframe") on bottomnav.htm doesn't work because the iframe doesn't reside in bottomnav.htm. It resides in index.htm. <br />
I need to find the correct path (target) to that iframe.<br />
<br />
How can i target "_parent OR _top" and "contentframe" at the same time to get the right path?<br />
<br />
<br />
<br />
Phew....it's hard trying to make this make sense....Do i make any sense???<br />
<br />
des9finger<!--content-->designfinger -<br />
<br />
Really like your site - very inventive, particularly that menu business. Great juxtaposition of different, stylistically discrete elements - nice to see Flash used for more than just flying letters and such. About your problem...a "target" isn't a path to a frame (or iframe); it's just a name, given special handling by the browser, that identifies the end user, so to speak, of a link/form submission/whatever. Specifying a true path and doing this in JS is sometimes desirable - but shouldn't be called for here. I'd like to see the page itself, particularly how you're using the image map. It's irrelevent how many iframes you embed in a document - all look to the containing document as parent, and should target sibling iframes without any special treatment. Attach some code if you like.<!--content-->MRKITE<br />
Many, many thanks for your kind words and help.<br />
<br />
I haven't posted the site yet, hopefully it should be going live in the next couple of days.<br />
<br />
I seemed to have solved the problem now after lots of experimentation thanks to your help, but because of the solution i've found another problem has appeared. <br />
<br />
I was targeting the iframe in the correct way with the correct href=http://www.htmlforums.com/archive/index.php/..... <br />
<br />
My new problem is that loading new content to that iframe from an image map only works provided i don't include any of the swap image code as below. <br />
-------------------------------------- <br />
<map name="contactbuttonMap"> <br />
<area shape="rect" coords="0,0,27,13" href=http://www.htmlforums.com/archive/index.php/"Contentcontact.htm" target="content" <br />
<br />
onMouseOut="MM_swapImgRestore();MM_showHideLayers('txtservices','','hide','txtcontact','','hide','txtterms','',' hide','txtlocation','','hide','txtstudio','','hide')" onMouseOver="MM_swapImage('wb4','','GIFS/button_pink.gif',1);MM_showHideLayers('txtservices','','hide','txtcontact','','show','txtterms','',' hide','txtlocation','','hide','txtstudio','','hide')" onClick="MM_showHideLayers('txtservicesCLICK','','hide','txtcontactCLICK','','show','txttermsCLICK','','hide' ,'txtlocationCLICK','','hide','txtstudioCLICK','','hide');return false" onFocus="if(this.blur)this.blur()"> <br />
</map> <br />
--------------------------------------- <br />
This leaves me with :- <br />
<br />
<map name="contactbuttonMap"> <br />
<area shape="rect" coords="0,0,27,13" href=http://www.htmlforums.com/archive/index.php/"Contentcontact.htm" target="content" <br />
</map> <br />
<br />
which leaves no rollover behaviour on the button etc... <br />
...a very dull button!!! <br />
<br />
<br />
Ideally i would like to keep all these behaviours on the button, so i'm hoping if you have any more time you might be able to show me how. <br />
<br />
Many thanks, <br />
<br />
des9finger<!--content-->Nothing like WYSIWYG...<br />
<br />
Try removing this:<br />
<br />
onClick=" MM_showHideLayers('txtservicesCLICK','','hide','txtcontactCLICK','','show','txttermsCLICK','','hide' ,'txtlocationCLICK','','hide','txtstudioCLICK','','hide');return false"<br />
<br />
from the MacroMedia MishMash - not exactly sure what layers are being 'showHided', but the return false; will kill the link being followed.<br />
<br />
Let me know what happens & *you're welcome*.<br />
<br />
kite<!--content-->
 
Back
Top