Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
Location: Netherlands
Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
Maybe I am missing something as when I use the example xml provided and stick it in a tour created with the normal template, the loadscene in the startup actions causes the layer not to appear.
Thank very much Klaus, That had it thinking, but I have too many data elements: They are 40 categories or more than I would have to duplicate. Won't there be another solution based in javascript?define different data elements
Best Regards,
Fernando
![]() |
Source code |
1 |
<data name="hosp" devices="normal"> ... {{FONTSIZE}} ... </data> |
This post has been edited 1 times, last edit by "Fernando" (Jun 7th 2018, 1:27pm)
![]() |
Source code |
1 2 3 4 5 6 7 |
<data name="categ1"><![CDATA[ HOSPEDAJES:<br> <span style="text-decoration:none;cursor:pointer;font-size:16px;" onclick="document.getElementById('krpanoSWFObject').call('any_action();');" style="color:#FFFFFF;">Item1</span><br> <span style="text-decoration:none;cursor:pointer;font-size:16px;"" onclick="document.getElementById('krpanoSWFObject').call('any_action();');" style="color:#FFFFFF;">Item2</span><br> (...) <span style="text-decoration:none;cursor:pointer;font-size:16px;"" onclick="document.getElementById('krpanoSWFObject').call('any_action();');" style="color:#FFFFFF;">Item200</span><br> ]]></data> |
![]() |
Source code |
1 2 3 4 5 6 7 8 |
<action name="add_html_code" type="Javascript"><![CDATA[ ... var content = krpano.get(args[1]); var fs = krpano.device.mobile ? 24 : 16; content = content.replace(/fontsize\:\d+px/, 'fontsize:'+fs+'px'); div.innerHTML = content; ... ]]></action> |
This post has been edited 1 times, last edit by "indexofrefraction" (Jun 7th 2018, 9:59am)
how can I put a button inside the html to close html div?
Hi,
see the 'Here a link for testing the krpano JS API' part in the example.
It shows how to call any krpano code and that can be also used to remove or hide the layer (e.g. call removelayer or set visible to false).
Best regards,
Klaus