Sie sind nicht angemeldet.

olihar

Schüler

  • »olihar« ist der Autor dieses Themas

Beiträge: 140

Wohnort: Iceland

Beruf: Interaction Designer

  • Nachricht senden

1

Mittwoch, 6. Mai 2009, 23:33

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

Quellcode

1
onclick="action(show_html_field2);"


That opens up an external html file.

I have

Quellcode

1
<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

Quellcode

1
<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

2

Donnerstag, 7. Mai 2009, 01:12

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.

Graydon

Profi

Beiträge: 614

Wohnort: Texas

Beruf: Industrial gas turbine services.

  • Nachricht senden

3

Donnerstag, 7. Mai 2009, 03:04

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.

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<action name="close_box_1">
...
...
</action>

<action name="close_box_2">
 ...
 ...
 </action>

<action name="close_box_3">
 ...
 ...
 </action>

<action name="close_box_n">
 ...
 ...
 </action>

<action name="close_all_boxes">
   action(close_box_1);
   action(close_box_2);
   action(close_box_3);
   ...
   action(close_box_n);
 </action>


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*

olihar

Schüler

  • »olihar« ist der Autor dieses Themas

Beiträge: 140

Wohnort: Iceland

Beruf: Interaction Designer

  • Nachricht senden

4

Donnerstag, 7. Mai 2009, 12:19

Thanks a lot guys, that works like a charm, Somehow the parent - child passed me when thinking this through.