I am wondering if anybody can share an example for the code to be used for a hotspot by clicking on which a new window with external HTML page would open in a lightbox window?
Like for example on the site http://altbier.com.ua/walk.php?pano=3221_7&lang=1#3221_7 - if you hover a table you will see a plate. If you click on the plate there is a pop-up - a lightbox window with a form (that is external HTML page). Any help will be highly appreciated!
Open external HTML pages in a lightbox window from a tour?
-
-
you should use JQuery for this job.
1.make a function in your html page to build lightbox window.
2.call this function in krpano by this command : js( ...Javascript code... )
https://krpano.com/docu/actions/#jssampel :
+ fist of all import FancyBox library to your html page.
http://fancybox.net/howto+ then use this function to build lightbox window :
Code
Display Morefunction popup() { $.fancybox( 'YOUR-HTML-ADDRESS/FILENAME.html', { 'width' : '100%', 'height' : '100%', 'autoScale' : false, 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe' } ); };
+ and call the popup function in krpano by this code :
NOTE:
Flashplayer Notes - this action requires the External Interface of the Flashplayer! This means the action will
work offline/locally only when the security settings of the Flashplayer were adjusted.
See here for more detatils - Local / Offline Usage. -
Hi thanks, i have try to open my page with the testing server of krpano, but the fancybox is not working.
In html page i have added this code:
########################################################
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script type="text/javascript" src="/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<script type="text/javascript">
function popup()
{
$.fancybox(
'http://www.mywebsite.it',
{
'width' : '100%',
'height' : '100%',
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'iframe'
}
);
};
</script>
</head>
<body>
########################################################in xml file this code:
<hotspot name="q2" url="JP/JP_info-icon.png" ath="-42.032" atv="31.684" scale="1" onhover="showtext(Info sul Virtual Tour, style1);" onclick="js( popup() );" />
#######################################################
Where is the problem?
Thanks.
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!