You are not logged in.

  • "claire_france" started this thread

Posts: 18

Location: Glasgow

Occupation: Virtual Tours, Photography, PHP & mySQL

  • Send private message

1

Tuesday, May 20th 2014, 4:17pm

openurl();

Hello,

I am trying to use openurl() to open a URL from an onclick event on a hotspot.

I have tried a thousand ways to get this working and it's driving me loopy. Please can someone tell me what I am doing wrong? Here is my hotspot code from the XML file.

<hotspot name="spot1" style="skin_hotspotstyle" ath="-8.183" atv="2.442" onclick="openurl('http://krpano.com',_self)" />
also
<hotspot name="spot1" style="skin_hotspotstyle" ath="-8.183"
atv="2.442" onclick="openurl('http://krpano.com',_self);" />
and a squillion variations thereof.

The hotspot displays, but clicking on yields no response.

Gnash.
in hope,
Claire

  • "claire_france" started this thread

Posts: 18

Location: Glasgow

Occupation: Virtual Tours, Photography, PHP & mySQL

  • Send private message

2

Tuesday, May 20th 2014, 5:37pm

OK, I figured this out. Phew.

The XML generated by the default krpano droplet includes a file skin/vtourskin.xml, which contains an onclick event for the style skin_hotspotstyle. This overwrites the onclick event.

I therefore added a linkedurl attribute in the same style as linkedscene to this onclick event, and it all works fine.

i.e.

Source code

1
if(linkedurl, openurl(get(linkedurl),_self);)

nwatts

Beginner

Posts: 6

Location: Dublin, Ireland

Occupation: Educational Technologist

  • Send private message

3

Wednesday, January 14th 2015, 2:05pm

Linked URL

Hi

I am struggling with the same problem. I have tried many variations of this but nothing happens on click. I created my own style. The image appears so the style is located

Any suggestions welcome

in tour.xml
<hotspot name="spot1" style="youTubeStyle" ath="55.794" atv="-14.871" linkedurl="https://www.youtube.com/watch?v=Rem9KkolKBI"/>


in vtourskin.xml

<style name="youTubeStyle" url="vtourskin_hotspot_r.png" scale="0.5" edge="top" oy="0" distorted="false"
tooltip=""
onclick= "if(linkedurl, openurl(get(linkedurl),_blank);)"
/>

4

Thursday, January 15th 2015, 11:05am

Hi,

there are two cases when this might not work:

1. when testing locally with the Flashplayer (see the notes in the openurl() docu)
2. or when pop-up-blocker blocks the window

Best regards,
Klaus

nwatts

Beginner

Posts: 6

Location: Dublin, Ireland

Occupation: Educational Technologist

  • Send private message

5

Thursday, January 15th 2015, 3:20pm

Testing Locally

Klaus

Thanks. Testing locally was the problem. now solved. Thanks

There is some discussion in the forums about embedding youTube videos in Krpano. Is there any way of doing this without custom js?

Thanks

6

Thursday, January 15th 2015, 4:07pm

Why not using the included Youtube example?
http://krpano.com/examples/118/examples/…er/example.html

7

Wednesday, March 4th 2015, 12:01pm

if(linkedurl, openurl(get(linkedurl),_self);)
OK, I figured this out. Phew.

The XML generated by the default krpano droplet includes a file skin/vtourskin.xml, which contains an onclick event for the style skin_hotspotstyle. This overwrites the onclick event.

I therefore added a linkedurl attribute in the same style as linkedscene to this onclick event, and it all works fine.

i.e.

Source code

1
if(linkedurl, openurl(get(linkedurl),_self);)
Can you please show a screenshot of the code because i can't figure it out..
Thx