How do I make an iWeb iFrame point to internal site page?

How can I have an iFrame have as its content one of my internal iWeb site pages?


I added an HTML snippet with the following code:


<IFRAME SRC = "http://www.apple.com" WIDTH="650px" HEIGHT="600px" FRAMEBORDER="0" --if "0" no border, otherwise "1" with border MARGINWIDTH ="0px" MARGINHEIGHT="0px" SCROLLING="no" --"no" no scrolling bar, "yes" show always, "auto" showed when need > Your browser does not support IFRAME </IFRAME>


This works and shows the apple.com page inside the iFrame. However, I'd like my iFrame to show the contents of a page that's part of my iWeb site.


Here, TestPage.html is part of my site. The following code does not work (iFrame is blank):


<IFRAME SRC = "TestPage.html" WIDTH="650px" HEIGHT="600px" FRAMEBORDER="0" --if "0" no border, otherwise "1" with border MARGINWIDTH ="0px" MARGINHEIGHT="0px" SCROLLING="no" --"no" no scrolling bar, "yes" show always, "auto" showed when need > Your browser does not support IFRAME </IFRAME>


How do I make this work?

iWeb '08, Mac OS X (10.6.7)

Posted on May 8, 2011 1:14 PM

Reply
7 replies

May 8, 2011 3:09 PM in response to analiai

The iFrame src will not work with just testpage.html. For it to work, your site really needs to be published and you need to link to the full url of your site where your page is - so the link should be iframe src="http://www.domain.com/site name/TestPage.html".


It should then display in your site.


If your site it published to MobileMe then you would link to it as: iframe src="http://web.me.com/username/sitename/TestPage.html".

May 8, 2011 3:25 PM in response to analiai


<IFRAME SRC = "TestPage.html" WIDTH="650px" HEIGHT="600px" FRAMEBORDER="0" --if "0" no border, otherwise "1" with border MARGINWIDTH ="0px" MARGINHEIGHT="0px" SCROLLING="no" --"no" no scrolling bar, "yes" show always, "auto" showed when need > Your browser does not support IFRAME </IFRAME>


MyOhMy, where did you find that garbage?


Try this.



<iframe src="http://url.to.file.html" frameborder="0" width="500" height="500" scrolling="no" allowTransparency="true"></iframe>

May 8, 2011 4:47 PM in response to analiai

SRC = "TestPage.html"

that because you use relative url path and you need to know how iweb generates its code, otherwise you be thrown off by it.

if your display page is same level (same folder) with TestPage.html then the src is: ../TestPage.html


and the reason is when you add code in html snippet widget, iweb add the code in a widget(#)_markup.html page, which locate in the display page_files folder.

May 8, 2011 6:45 PM in response to Cyclosaurus

That's exactly what I needed, I wasn't sure how iWeb directed the relative URL paths from within the site.

I had tried your suggestion before, but couldn't see the iFrame being loaded in the page within iWeb. The trick is to ignore that it doesn't work there; after publishing the site to a local folder and refreshing the page in my browser, it finally worked.

Thank you!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How do I make an iWeb iFrame point to internal site page?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.