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
 Iframe
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sjuufke
Practical

Netherlands
20 Posts

Posted - 31 Oct 2006 :  14:49:59  Show Profile  Visit sjuufke's Homepage  Reply with Quote
Can the content of an Iframe be made variable?

<IFRAME SRC="http://www.whatever.com" NAME="Generic1" width="450" height="350">
Jammer genoeg ondersteunt je browser geen frames.
</IFRAME>

I want to make just 1 iframe wich can load different url's depending on different menu items.

Greetz

Sjuufke

s.dav
Site Admin

Italy
3364 Posts

Posted - 31 Oct 2006 :  17:52:58  Show Profile  Visit s.dav's Homepage  Reply with Quote
Yes by using Javascript:

- Put a generic iframe object into the page
- Put into a javascript block this code:

document.frames['Generic1'].location='http://www.google.com'

- Lauch the code using events ;-)

Tested and it works ok ;-)

Regards, Davide
Go to Top of Page

Waldorf
Super User

Belgium
284 Posts

Posted - 31 Oct 2006 :  19:09:51  Show Profile  Visit Waldorf's Homepage  Reply with Quote
yes, that is the easy way!
and idd. it woks well

*
"Happiness" is making -> The <- Choice!
*
Go to Top of Page

Waldorf
Super User

Belgium
284 Posts

Posted - 31 Oct 2006 :  22:14:39  Show Profile  Visit Waldorf's Homepage  Reply with Quote
@Dav.
strange, I tried to do the same with a "generic" but "Flash" and nothing happens?

*
"Happiness" is making -> The <- Choice!
*
Go to Top of Page

petran
Super User

Netherlands
345 Posts

Posted - 01 Nov 2006 :  00:41:45  Show Profile  Visit petran's Homepage  Reply with Quote
When you want to change its content by using a menu you can choose the iframe as target in the link wizard....or do I miss something?

Seems to me even more simple

--------

regards

Petran
Go to Top of Page

Waldorf
Super User

Belgium
284 Posts

Posted - 01 Nov 2006 :  01:35:58  Show Profile  Visit Waldorf's Homepage  Reply with Quote
no,no, you are not missing something, heu...(for once)

there are 3 ways to do it! [3 yes]
A minus with the target method = that we have no preview!

*added*

Flash problem also solved!
[3 yes]

*

*
"Happiness" is making -> The <- Choice!
*

Edited by - Waldorf on 01 Nov 2006 05:27:42
Go to Top of Page

petran
Super User

Netherlands
345 Posts

Posted - 01 Nov 2006 :  13:12:07  Show Profile  Visit petran's Homepage  Reply with Quote
HaHa[3 w], Beware Waldorf...Belgium is only 20 minutes away

--------

regards

Petran
Go to Top of Page

s.dav
Site Admin

Italy
3364 Posts

Posted - 02 Nov 2006 :  11:12:17  Show Profile  Visit s.dav's Homepage  Reply with Quote
>strange, I tried to do the same with a "generic" but "Flash" and
> nothing happens?

This doesn't work because it's not an IFRAME ;-)

I think you should change the code to a thing like this (not tested):

document.getElementById('Generic1').src='http://pippo.swf'

but I'm not sure, I should make some tests...

Regards, Davide
Go to Top of Page

Waldorf
Super User

Belgium
284 Posts

Posted - 02 Nov 2006 :  18:46:50  Show Profile  Visit Waldorf's Homepage  Reply with Quote
Thanks Dav. but see my post (this topic) Posted - 01 Nov 2006 01:35:58
it works in an Iframe

blue txt ;-)
*

*
"Happiness" is making -> The <- Choice!
*
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