Changing iFrame content


Registered User
52 posts

Hi,

it's me again. Is it possible to change the content of a html widget (iframe) when one clicks on a button?

If not, how would you do it in VSD?

Regards,
Marc
Who needs a nickname, be yourself. Well most of the time...


Senior Advisor
13,188 posts
Online Now

Sure, This can be done by naming your iframe and calling it in a link.

Place this in to the Body html of a html box.
<iframe name="iframeswitch" src="mypage.html" width="800" height="500" scrolling="no" frameborder="0">
<p>Your browser does not support iframes.</p>
</iframe>

Place this into the body of another html box.

<a target="iframeswitch" href="myotherpage.html">Switch content</a>

I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
http://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
http://progrower.coffeecup.com/shop/


Registered User
52 posts

Hi Eric,

I am trying to understand this.
Lets say I have 15 buttons (objects), each should show a different page (iframe) within the main page where the buttons are. So I need 15 html boxes on top of each other?

Marc
Who needs a nickname, be yourself. Well most of the time...


Senior Advisor
13,188 posts
Online Now

You can place them all in one html box if you want or keep them separate so you can move them around. You can also link an image instead of using text for your link button.:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
http://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
http://progrower.coffeecup.com/shop/


Registered User
52 posts

You are way out of my league Eric :(

Would you be willing to give me an example with 2 content pages in one html box. And how I should 'program' the buttons.

1) Lets say I have 2 html pages a.html and b.html that should shown in a html box.
2) I have 2 objects (shapes) that I can change with the Link Properties (Create link)

How do I go about this?

Regards,
Marc





Who needs a nickname, be yourself. Well most of the time...


Senior Advisor
13,188 posts
Online Now

I'm not on my pc that has VSD at the moment. I will when I get it back up and running. Day or two. Did you try the example I posted?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
http://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
http://progrower.coffeecup.com/shop/


Registered User
52 posts

I tried to,

just not clear enough yet for me.

What should be in the link properties of the button (shape)
Page in The website could go to the html page, a.html but it opens a new window?

Marc
Who needs a nickname, be yourself. Well most of the time...


Senior Advisor
13,188 posts
Online Now

See if this helps.:)
http://progrower.coffeecup.com/iframeswitch.html
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
http://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
http://progrower.coffeecup.com/shop/


Registered User
52 posts

Hi Eric,

That helped, thanks.
Am I correct in thinking that you can not use a shape box to change the content of a iFrame?

Marc
Who needs a nickname, be yourself. Well most of the time...


Senior Advisor
13,188 posts
Online Now

Are you saying linking a square box element made in VSD?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
http://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
http://progrower.coffeecup.com/shop/

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.