Hexagora Forum
Hexagora Forum
Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Dynamic HTML Editor
 Dynamic HTML Editor
 Question about iframe in layers
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

orjan
Novice

9 Posts

Posted - 10 Sep 2007 :  16:50:39  Show Profile  Visit orjan's Homepage  Reply with Quote
Hi!

Does only the shown layer load, or does the hidden layers also load if I have iframes linking to different sites on several layers?

Say if i have one layer (layer A) with an iframe linking to www.sitea.com and another layer (layer B) with an iframe linking to www.siteb.com. When you click onto my site layer A is shown and layer B is hidden. Does only sitea load, or does siteb load as well?

I cant figure it out. I would like only the shown layer to load, so my page loads quicker.

-Orjan-

s.dav
Site Admin

Italy
3364 Posts

Posted - 11 Sep 2007 :  10:42:13  Show Profile  Visit s.dav's Homepage  Reply with Quote
In your sample every site is loaded when the page loads.
You can act using Javascript changing the address of the IFRAME by javascript code

Put this code in the "Head Code" section of your page:

<script language="javascript" type="text/javascript">
<!--

// changes the URL of a certain IFRAME object
// Note that the IFRAME MUST have a page loaded before using this
function changeIframeURL(id,url)
{
var oiframe=document.getElementById(id);
if (oiframe) oiframe.contentWindow.document.location=url;
}

//-->
</script>

then draw an IFRAME into your page giving it a name (<IFRAME id=myIFRAME)


then you can create a text or buttons and using events you can change the IFRAME URL:
- use the OnClick event,
- JavaCall action
- write changeIframeURL('myIFRAME','http://www.hexagora.com');

Not tested but should work ;-)

Regards, Davide
Go to Top of Page

orjan
Novice

9 Posts

Posted - 12 Sep 2007 :  19:41:40  Show Profile  Visit orjan's Homepage  Reply with Quote
Thanks that works great!
Go to Top of Page

orjan
Novice

9 Posts

Posted - 12 Sep 2007 :  19:44:01  Show Profile  Visit orjan's Homepage  Reply with Quote
Is there a way to make a page load in the iframe automatically at first?
Go to Top of Page

orjan
Novice

9 Posts

Posted - 13 Sep 2007 :  14:43:59  Show Profile  Visit orjan's Homepage  Reply with Quote
Instead I made all pages in D.H.E., and linked to these pages through iframes on the index-page. But is there a way to make only the shown iframe load?

Thanks for help.

-?rjan-
Go to Top of Page

s.dav
Site Admin

Italy
3364 Posts

Posted - 14 Sep 2007 :  14:01:57  Show Profile  Visit s.dav's Homepage  Reply with Quote
Act on the IFRAME code and change the >> src="<yourpage.htm>" << attribute

Regards, Davide
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Hexagora Forum © s.dav Go To Top Of Page
Snitz Forums 2000