Hyperlinks to external websites

  • How do I add an external hyperlink to a hotspot?

    I've figured out how to open the Editor plugin and created a 'hotspot' in my panorama but don't know the code to add to the XML file to make it an active link. I want it to link to an external URL.

    Is this possible, and if so, how?

    Many thanks

    A

  • Code
    <hotspot name="your_hotspot_name".
    .
    . 
    onclick="openurl(http://www.google.com/,_blank)"
    </hotspot>

    If you want to open in in new window. For other details follow the documentation link already provided to you by Alexey.

  • Umalo, I'm afraid url needs those tricky single quotation marks before and after the url, if I remember it correctly from the documentation examples...

    Smth like this:

    Code
    openurl('http://yourwebsite.html');


    I'm still quite often puzzled where to put this quotations and where not to...

    For example, in the txtadd(); function:

    Code
    txtadd(new_variable, 'get(old_variable)','_addition');

    or will it work this way:

    Code
    txtadd(new_variable, get(old_variable),'_addition');

    *rolleyes* or both are quite right?

    Regards,

    Alexey

  • But now when I think twice, there must be a reason why it is stated in documentation the openurl with single quote.
    I don't think I have project where I put them up to now. Tested on many devices and works fine.

    P.S. I'm sure Klaus will give his statement here. I just hope I will not need to update all projects after that ;(

  • Hi

    I've tried with and without single quotes (see below) but neither work. Am I missing something really obvious? I've tried with and without Editor open on the pano. Any ideas?

    <hotspot name="hs1" onclick="openurl('http://www.google.com/,_blank')">
    <point ath="0.080250" atv="0.023000" />
    <point ath="0.094000" atv="0.023000" />
    <point ath="0.094000" atv="0.028250" />
    <point ath="0.080250" atv="0.028250" />
    </hotspot>

    and

    <hotspot name="hs1" onclick="openurl(http://www.google.com/,_blank)">
    <point ath="0.080250" atv="0.023000" />
    <point ath="0.094000" atv="0.023000" />
    <point ath="0.094000" atv="0.028250" />
    <point ath="0.080250" atv="0.028250" />
    </hotspot>

    Thanks


    A

  • Hi Alexey

    Thanks for that but still no success! When I open the pano in Internet Explorer all looks OK. The hotspot appears as I hover mouse over hotspot (cursor changes to hand) but nothing happens when I click. Flash security settings are OK so that shouldn't block. Here is the code as it appears now:

    <hotspot name="hs1" onclick="openurl('http://www.google.com/,_blank');"> <point ath="0.080250" atv="0.023000" />
    <point ath="0.094000" atv="0.023000" />
    <point ath="0.094000" atv="0.028250" />
    <point ath="0.080250" atv="0.028250" />
    </hotspot>

    Is it in the right place, between <hotspot> and <hotspot/> markers?

    Thanks

    A

  • Hi, in your code the single quotation mark stands after the " _blank" parameter, it must be located before it

    Just tested the following code and it works fine:

    Regards,

    Alexey

  • Hi everyone...
    I too have an issue. Here is my code generate by a php script:

    spot1 works perfectly because it is linked to an internal scene
    spot2 for now just points to google but would in actual fact point to another related link on my website.

    Online Example:
    http://home.govisit.co.za/viewer/?s=10 look towards the rocks away from the house. the arrow on top of the rock is suppose to load an different virtual tour on the rocks.


    It simply does not work I'm using krpano 1.6.3. Any ideas would be appreciated. I have tested it on my local webserver and online webserver and both have the same issue.

  • No, you add the onclick quite right, but you have style="skin_hotspotstyle" defined also which also has onclick parameters, and any style ALWAYS overrides the same parameters indicated inside a hotspot. So to add onclick event to this very hotspot either delete "style="skin_hotspotstyle" and transfer all parameters from it into the hotspot. Or copy the style code, paste it, rename it as "skin_hotspotstyle_2" and change the onclick parameter to what you need. And in this case don't forget to state "style="skin_hotspotstyle_2". The "skin_hotspotstyle" can be found inside the standard "vtourskin" xml generated by the droplets.

    Hope this helps *tongue*

    Regards,

    Alexey

  • No, you add the onclick quite right, but you have style="skin_hotspotstyle" defined also which also has onclick parameters, and any style ALWAYS overrides the same parameters indicated inside a hotspot. So to add onclick event to this very hotspot either delete "style="skin_hotspotstyle" and transfer all parameters from it into the hotspot. Or copy the style code, paste it, rename it as "skin_hotspotstyle_2" and change the onclick parameter to what you need. And in this case don't forget to state "style="skin_hotspotstyle_2". The "skin_hotspotstyle" can be found inside the standard "vtourskin" xml generated by the droplets.

    Hope this helps *tongue*

    Hi Alexey

    Thanks, I'll give it a try tomorrow. Been at it all day long between various PHP files never thought of opening the skin.xml file to hunt for the problem. Big Thanks! *thumbup*

  • Hi Alexey

    Thanks, I'll give it a try tomorrow. Been at it all day long between various PHP files never thought of opening the skin.xml file to hunt for the problem. Big Thanks! *thumbup*

    OK OK I could not wait till tomorrow. Added a simple hotspot just for testing and now it is working perfectly. Completely MySQL driven virtual tour system in the making.

    Thanks Alexey. You made my day *thumbsup*

  • Having similar problem. Hotspot works locally but when uploaded to FTP site the hotspot does not show and the tour freezes up. It is so frustrating when you get everything working locally then transfer to online and it all craps out. Any help is appreciated. Thanks,


    <!-- place your scene hotspots here -->
    <hotspot name="spot1" style="skin_hotspotstyle" ath="102.288" atv="-6.519" linkedscene="scene_c_(09)" />

    <hotspot name="link1"
    type="image"
    url="http://www.relprocessing.com/storage/Info.p…N=1341086388560"
    alturl="..."
    keep="false"
    devices="all"
    visible="true"
    enabled="true"
    handcursor="true"
    maskchildren="false"
    zorder="1"
    style=""
    ath="15.627" atv="-16.344"
    edge="center"
    zoom="false"
    distorted="false" rx="0.0" ry="0.0" rz="0.0"
    width="50" height="50"
    scale="1.0"
    rotate="0.0"
    alpha="1.0"
    onover=""
    onhover=""
    onout=""
    onclick="openurl('http://www.dickslastresort.com/',_self);"
    ondown=""
    onup=""
    onloaded=""
    />

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!