Useful iframe stuff

Q&A about the latest versions
Post Reply
User avatar
Hopki
Gnome
Posts: 13005
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.
There are two projects attached, one for Pano2VR and one for Pano2VR Pro.
All the attached projects have 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 panorama that is being displayed.

The iFrame code I am using is:

Code: Select all

<iframe src="pano.html" name="iframe_window" width="800" height="600" 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 pano.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/hut" target="iframe_window">The Hut</a>
When the link is clicked it will load the the Hut panorama in the iFrame. You can have as many links as you require or if you are using Pano2VR Pro use Direct Node Access, please see Tip.

Also noteworthy is that fact the panorama can be hosted on the same server or as in this case on a different server or both.
When outputting from Pano2VR it is best to output with fullscreen selected.
Regards,
Hopki
Attachments
iframe_pro.zip
(720.64 KiB) Downloaded 568 times
iframe.zip
(1.04 MiB) Downloaded 340 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/
RobM
Posts: 250
Joined: Sat Apr 16, 2011 12:51 pm
Location: Belgium

thanks Martin, Going to check this out and try get my head around it :)
Gregory
Posts: 19
Joined: Wed Jul 15, 2009 7:19 pm

Hi Martin,
This is exactly I was looking for.
Should I change something in the iFrame code to create a iframe for Object2VR ?
Thank you,
Gregory
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi, this is also in the Object2 VR forum with a working example.
http://gardengnomesoftware.com/forum/vi ... =14&t=8531
Regards,
Martin
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/
Gregory
Posts: 19
Joined: Wed Jul 15, 2009 7:19 pm

Thanks
Post Reply