how to change the html data path in textfield plugin

  • OK i have these 2 buttons and i want to load the same text box with each button but have the text inside change based on the button pressed. I have testtext and testtex2 set as the data names. I tried with and without quotes. anyone know what the syntax would be to "SET" html="data:testtext"


    <plugin name="load1" url="../../panos/core/plugins/textfield.swf" children="false" keep="true"
    css="p{color:#000000; font-family:Arial; font-weight:bold; font-size:13; margin-left:5; margin-right:5; text-align:center; }" backgroundcolor="0xFFFFFF" roundedge="5" shadow="1" borderwidth="0" glow="4" glowcolor="0xFFFFFF" visible="true"
    html="[p]Facts[/p]"
    blendmode="normal"
    align="bottom" x="-200" y="15" width="120" height="20"
    onclick="set(plugin[text].html,'data:testtext'; set(plugin[textbox].visible,true;"
    zorder="2"
    />

    <plugin name="load2" url="../../panos/core/plugins/textfield.swf" children="false" keep="true"
    css="p{color:#000000; font-family:Arial; font-weight:bold; font-size:13; margin-left:5; margin-right:5; text-align:center; }" backgroundcolor="0xFFFFFF" roundedge="5" shadow="1" borderwidth="0" glow="4" glowcolor="0xFFFFFF" visible="true"
    html="[p]History[/p]"
    blendmode="normal"
    align="bottom" x="200" y="15" width="120" height="20"
    onclick="set(plugin[text].html.data:testtext2; set(plugin[textbox].visible,true;"
    zorder="2"
    />

  • Hi VN2009,

    after a lot of searching.... *rolleyes* I think the problem on your code is :

    onclick="set(plugin[text].html.data:testtext2); set(plugin[textbox].visible,true);"

    also the set(plugin[text].html value must be, in your case, without singlequotes:

    onclick="set(plugin[text].html,'data:testtext'; set(plugin[textbox].visible,true;" wrong
    onclick="set(plugin[text].html,data:testtext; set(plugin[textbox].visible,true;" good

    Hope this can help. *smile*

    Salut.

  • michel

    i see the missing ) now ... its amazing now many times you can look at something and not be able to see what is missing. get a 2nd set of eyes and it sticks out like a sore thumb. i have not had a chance to test your findings will do so tonight. thank you for your effort. what you found will work, i hope.

  • Hi VN2009,

    Quote

    i see the missing ) now ... its amazing how many times you can look at something and not be able to see what is missing.

    It's a classic *rolleyes* you have it just in front but no way to see it *g*

    Quote

    get a 2nd set of eyes and it sticks out like a sore thumb.

    Does not understand this... *question* Something about glasses that can't help to see better *question*

    Quote

    thank you for your effort. what you found will work, i hope.

    Your are well come *wink* it was a good way for me to learn more about the textfield plugin. So thank you too. *thumbup* And yes,I have tried your code adding it at the textfield example that comes on the Krpano package (doing some little modif) and it work well for me.

    Salut.

Participate now!

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