You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

olihar

Trainee

  • "olihar" started this thread

Posts: 140

Location: Iceland

Occupation: Interaction Designer

  • Send private message

1

Wednesday, May 6th 2009, 11:33pm

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

Source code

1
onclick="action(show_html_field2);"


That opens up an external html file.

I have

Source code

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

Source code

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

VN2009

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

2

Thursday, May 7th 2009, 1:12am

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

Professional

Posts: 614

Location: Texas

Occupation: Industrial gas turbine services.

  • Send private message

3

Thursday, May 7th 2009, 3:04am

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.

Source code

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

Trainee

  • "olihar" started this thread

Posts: 140

Location: Iceland

Occupation: Interaction Designer

  • Send private message

4

Thursday, May 7th 2009, 12:19pm

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