You are not logged in.

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.

jeromebg

Professional

  • "jeromebg" started this thread

Posts: 795

Location: Angers - France

Occupation: Photographer

  • Send private message

1

Monday, April 27th 2015, 12:22pm

Set html with xml.url

Hi, have a problem I don't understand,
I want to display the title of the current pano according to the xml url

Source code

1
2
3
4
5
6
7
8
...
onloadcomplete="showtitre(get(xml.url));"

..
<action name="showtitre">
set(panotitre,%1);txtreplace(panotitle, panotitre, .xml,);
set(layer[titrepano].html, 'data:get(panotitle)');
</action>


works perfect for the first pano, but when I load a new pano with loadpano(my_pano.xml....) the html value doesn't change ???
any idea ?

Tourvista

Intermediate

Posts: 258

Location: Leicester UK

  • Send private message

2

Monday, April 27th 2015, 12:29pm

Hello,

From the Krpano Documentation page:

Quoted

Onloadcomplete

This event will be called when the loading of the pano image is done.
When using multi-resolution images, then this event will be called once when all parts for the current-view were loaded completely.

This means that the action won't be triggered after ALL parts of the current view were loaded.

Can I suggest use 'onnewpano ' instead?

Cheers

Tourvista

Intermediate

Posts: 258

Location: Leicester UK

  • Send private message

3

Monday, April 27th 2015, 12:31pm

Also, would it be possible for you to post more lines this section of your code?

Source code

1
2
3
...
onloadcomplete="showtitre(get(xml.url));"
...


Is that line inside an <events> tag?

Cheers,

jeromebg

Professional

  • "jeromebg" started this thread

Posts: 795

Location: Angers - France

Occupation: Photographer

  • Send private message

4

Monday, April 27th 2015, 1:33pm

Ok, thanx Tourvista but it wasn't a problem of event,
this code works :

Source code

1
2
3
4
<action name="showtitre">
txtadd(panotitre,'data:',%1);txtreplace(panotitle, panotitre, .xml,);
set(layer[titrepano].html, get(panotitle));
</action>