![]() |
|
|
|
|
|
||||||||||
|
| User list | Rules | You are not logged in.
Hello,
I hope anyone can help me out. I'm strugeling for serveral days to get this to work.
I want to call a javascript function declerated in the index.html file, like this example below:
...
<body>
[[Virtualtour code]]
<script>
function callToAction(pid){
alert(pid);
}
</script>
</body>
...
I want the pano tour to call the function 'callToAction' supplying the function with a variable. In the program I made a hotspot, for the link I'm using the javascript option and filled in: "m callToAction(hello world)". When I test the tour nothing is happening.
To prove the function working I also made a normal link in HTML (<a href="javascript:callToAction('hello world');void(0);">Test function</a>) to trigger the function 'manually', this works perfectly.
How can I get this to work via the tour?
Thanks
Offline
Hi.. looking at your javascript you are not telling it do do anything.
Have you tried.. onClick=callToAction(hello world)
Destiny..
Online
Hi,
The way you wrote your call in the Hotspot Properties is the right one.
To be able to call some JS function you have to enable the JS interface of the player. In the current version of Panotour Pro, it is not enabled by default (it will be in 2.0 version).
To enable the JS interface, you have to use the domains restriction feature in the "Project Properties/Build" tab.
Best Regards,
Gérald
Offline
May I ask, what will you use this for.. I just uploaded a test... http://members.westnet.com.au/dps/js/co … ltour.html
Destiny...
Online
Hi Destiny,
It works. I seemed to have had a problem with Wamp. I couldn't get scripts to work.
I like Panotour and like to exlpore the crative possibilities.
Have a look at: www.panoramix360.nl then you see what I mean.
Thanks
René
Offline
Thats good..
I guess that was what Gérald was suggesting...
Really cool link... I love ptp for its endless possibilities too.. I never get tried of trying new things.. I tend to bounce from one thing to other... but often forget how I did it.. ![]()
I am sooo looking forward to checking out V2.. I am really holding off from getting too involved with some of the ideas I have until I check the new version out.. The real power of ptp is the editing of the code/script options... I love seeing what others are achiveving, it tends to give me ideas.. ![]()
Destiny....
Online
René, by rights the script should not need onclick since that is in the xml code for the hotspot.. However, i have had issues with not putting onclick, it doesn't seem to work.. For the scripts I have had working, if I put onclick with the call in ptp, it works.. but without it, it doesn't..
<hotspot name="spot0" onclick="onclick=js(return hs.expand(id=thumb2));"
... but in saying that.. this call doesn't work yet...
... Now I am working with the notion of not putting the onclick to see if I can get it to work... ![]()
![]()
Destiny...
Online
I will hand this information to my son who is the expert. My knowledge on this subject ends with html.
We'll post our results because it is important to have links from the photography we produce to the customers collection.
If you look at the fashion shoots on my website you can see it's potential.
It might take a little time because we leave for Australia next thursday. A little luxury problem.
René
Offline
Bring your sun cream, it was 39c in Queensland last week..
or bring your brolly, the stroms are coming now... ![]()
I will continue to play with the JavaScript, its a pain.. Not even sure if what I am trying to do is doable...
Have fun in the land down-under..
Destiny...
Online
Hi Guys,
Allright so here is my situation:
I have a panotour VT embed into a html page with hotspots that are to display content of another html page in a shadowbox.
This example is what im trying to achieve
http://virtualtuur.com/shadowboxtest/
I have this javascript function on the page where the VT is embed :
<script type="text/javascript">
function openShadowbox(content, title){
Shadowbox.open({
content: content,
title: title
});
}
</script>
How do I call my function in Hotspot properties in panotour?
Ive tried like : openShadowbox(toppano/page1.html, a title) , openShadowbox('toppano/page1.html', 'a title'), the same with "onclick=" at the beginning...
How do I write it?When I click on the hotspot nothing happens
Im developing it locally on Wamp.. I've allowed my Wamp folder, the panotour folder in Global Security Settings panel of Flash player..still doesn't work..
The shadowbox works coz Ive tried it with a normal <a> link
I really need some help on that! Thanks
Offline
Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
|
CHOOSING KOLOR Why choose Kolor? Which solution to choose? Download a trial Where can I buy? Education |
SOFTWARE Autopano Pro Autopano Giga Panotour Panotour Pro XnView |
ACCESSORIES Training DVD Panobook PROJECTS Paris 26 Gigapixels Yosemite 17 Gigapixels |
COMMUNITY Forums YouTube channel Google+ |
COMPANY Blog About Kolor Resellers Contact Visit us |
PRESS Press center Press review TOOLS My account |
