Useful iframe stuff

Q&A about the latest versions
Post Reply
User avatar
Hopki
Gnome
Posts: 13029
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi all
Have had many questions regarding iFrames so I thought I would post this.
Please see the attached Object2VR project.

The project has an index.html page in the output folder, this represents your web page.
Why I wanted to post this was because of the name attribute that can be used in an iFrame.
The name attribute lets you target the iFrame with a link, thus changing the Object that is being displayed.

The iFrame code I am using is:

Code: Select all

<iframe src="oject.html" name="iframe_window" width="600" height="639" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" style="float:left; margin-left:0px" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"></iframe>
When the index.html page is opened the object.html page will be displayed.
Note that the name for the iFrame is: “iframe_window”. The name can be anything but as long as it unique in your page.

The link has to include the name:

Code: Select all

<a href="http://support.ggno.me/objrobot" target="iframe_window">Robot</a>
When the link is clicked it will load the the Robot object in the iFrame. You can have as many links as you require.
Also noteworthy is that fact the object can be hosted on the same server or as in this case on a different server or both.
When outputting from Object2VR an html page to be used in an iFrame it is best to output with fullscreen selected.
Regards,
Hopki
Attachments
object_iframe.zip
(1.58 MiB) Downloaded 422 times
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Post Reply