selectIdItem for combobox.js

  • Hi, iy looks that selectIdItem doesn't work with the combobox.js version (on ipad and iphone)
    Am I right or is my code wrong ?

    The page to look with an ipad or iphone : http://saint-jean-de-monts.org/360images/foret.html
    the combobox show the first item instead of the 4th item

    here is my code in the xml file of the pano :

    Code
    <events onxmlcomplete="plugin[cb].selectIdItem(item4);"/>

    and the combobox is the skin mobile file :

    Code
    <plugin name="cb" url="%SWFPATH%/plugins/combobox.swf" alturl="%SWFPATH%/plugins/combobox.js" align="leftbottom" x="10" y="10" zorder="2" keep="true" >
    <item name="item1" caption="Les plages" onclick="loadpano(estacade_jour.xml, null, MERGE, BLEND(1));"/>
    <item name="item2" caption="Centre ville" onclick="loadpano(centre_jour.xml, null, MERGE, BLEND(1));"/>
    <item name="item3" caption="Odysséa" onclick="loadpano(odyssea_jour.xml, null, MERGE, BLEND(1));"/>
    <item name="item4" caption="La Forêt" onclick="loadpano(foret.xml, null, MERGE, BLEND(1));"/>
    <item name="item5" caption="Demoiselles" onclick="loadpano(demoiselles.xml, null, MERGE, BLEND(1));"/></plugin>

    thanx for looking !

  • Hi,

    Quote

    It works with onloadcomplete instead of onxmlcomplete...
    don't know why but it works !

    there is no guarantee by default that the plugin it already loaded at the "onxmlcomplete" event,
    so when there is a call to selectIdItem but the plugin itself is not loaded the call will fail of course,

    either add preload="true" to the plugin to make sure that it will be loaded before any actions starts,
    or use the onloaded event of the plugin to make sure that the plugin is already loaded,

    best regards,
    Klaus

Participate now!

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