Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

virtual pete

Fortgeschrittener

  • »virtual pete« ist der Autor dieses Themas

Beiträge: 245

Wohnort: Nerja

Beruf: Holiday rentals Nerja Costa del Sol

  • Nachricht senden

1

Samstag, 4. Oktober 2014, 00:07

hotspot onclick call

Hi, can someone help me with this. I am trying to apply an onclick call to a hotspot but failing miserably. I can do it no problem to a layer like so

<layer name="skin_logo" url="teamstarlogosmall.jpg" scale="1.00" align="lefttop" onclick="js(open_win());" />

in html file

<script>
function open_win()
{
window.open("http://www.holidaynerja.co.uk/video/CUB1B.html","target_self")
}
</script>


But in a hotspot I have troubles ie:

<hotspot name="spot1A" style="skin_hotspotstyle" ath="34.371" atv="7.563" onclick="js(lightboxme('http://www.n2works.com/maps/r_map.php?

id=291','width:760 height:520 sameBox:true'));"/>


in html file head

<link type="text/css" rel="stylesheet" href="http://www.holidaynerja.co.uk/floatbox5.7/floatbox.css" />
<script type="text/javascript" src="http://www.holidaynerja.co.uk/floatbox5.7/floatbox.js"></script>
<script type="text/javascript" src="http://www.holidaynerja.co.uk/floatbox5.7/options.js"></script>

<script>
function lightboxme(url, loptions) {

fb.start(url,loptions);

}

function rescroll() {
$('html').css({overflow:'auto'});
}

function lightbox_noscroll(url, loptions) {

$('html').css({overflow:'hidden'});
fb.start(url+'&'+$('#Form2').serialize(),loptions);

}
function resizefb() {

fb.resize();

}

//this one is to check if it´s not working that the call is being made to the right place

function checkcall(){

alert('got it!');

}
</script>


Hopefully something pretty basic??

Many thanks

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

2

Samstag, 4. Oktober 2014, 08:55

Yep, sure it's basic)

Your hotspot has style assigned to it (called "skin_hotspotstyle"). And all parameters stated inside the style always override the ones stated inside the hotspot/layer. So you can either modify "onclick" event inside the "skin_hotspotstyle" (if this event is global for all hotspots) or remove the style from a particular hotspot and write all parameters inside it the way you need them (if the event needs to be applied only inside of only one hotspot).

Hope I was clear in my explanation *smile*
Regards,

Alexey