Closing multible textfields.

  • Hi gang

    I am having some problems with closing multiple text fields all at once instead having to close them 1 by one.

    I have a hotspot with

    Code
    onclick="action(show_html_field2);"

    That opens up an external html file.

    I have

    Code
    <a href="event:action(show_html_fielde);">new box</a><br/>

    and that opens up another box. I will most likely have more of them.

    But then it comes to closing. I use

    Code
    <a href="event:action(hidewindow2,htmltext2);">close Window</a><br/>

    to close the first box, is there any way to close all boxes with a "master" close button.

    Best
    Ólafur

  • i would create an action to close each window then on the master close link run both actions and they will both close. there might be a way to do something like this with the new 1.0.8 beta using the parent/child plugin deal but i have not looked into that yet.

    i am sure within 24 hrs Graydon, Shanti or Klaus himself will have a better answer. these forums are great lots of knowledgeable people.

  • If you know up front how many "boxes" you are going to open... and the names of each... then VN2009 has it correct. For each box, create an action that closes it...

    THEN... if you are setting up a "master - close all" button somewhere... then include each of those single actions within it.

    NOTE - nomenclature / syntax / format is NOT correct... just a quick illustration of the concept.

    You could further simplify the code by using a "generic" action... and passing a parameter (%#) through to it... see http://www.krpano.com/docu/xml/#action

    May be best to set it up the long way at first and then work on simplifying it... *smile*

Jetzt mitmachen!

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