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

    Code
    ...
    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 ?

  • Hello,

    From the Krpano Documentation page:

    Zitat

    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

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

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

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!