Add javascript-function to skin-image

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
CBosch
Posts: 240
Joined: Fri May 23, 2014 11:52 am

For my mobile-website I made some panos and open them by selecting from a list. The pano is opened in a new browser-tab. I want to habe a small "back"-icon in the pano and if clicking it the actual tab should close. Where can I insert/replace the code for my own code in the skin.js?
Have a nice day

Christian
CBosch
Posts: 240
Joined: Fri May 23, 2014 11:52 am

-SOLVED-

Found the part by choosing in the skin: mouse click->openURL/_self and created a page only with the code to close the current tab. Works but is not very smart ;-) Due to replacement of the close.php-file I searches in the skin.js for the path and found the function which I adapted for my purpose

Code: Select all

this._closebutton.onclick=function () {
			window.close();
		}
Works fine. Now I have in my mobile pano in the upper left corner a image and clicking this will return to the last page.
Have a nice day

Christian
User avatar
Hopki
Gnome
Posts: 13026
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Christian,
To a Close Button in your skin add the javascript call in a Go To URL action.
1.png
1.png (90.01 KiB) Viewed 3303 times
Also works with history back etc.
Regards,
Hopki
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/
CBosch
Posts: 240
Joined: Fri May 23, 2014 11:52 am

Hi Hopki,

that's really great to type in the URL-field to get the Javascript embedded. Thanks for the help.
Have a nice day

Christian
Post Reply