problem with hidden/invisible table

Avatar

Avatar

ibwaheemi

Avatar

ibwaheemi

ibwaheemi

21-12-2008

hi



i am trying to make invisible or hide a whole table in a dynamic form using a checkbox, i have this formcalc in the change event.



if (this.rawValue == 1)

then

Table1.presence = "visible";

else

Table1.presence = "hidden"

endif



Any ideas?

Replies

Avatar

Avatar

pguerett

Avatar

pguerett

pguerett

22-12-2008

Check the java console and see if you are getting any errors. Is the form saved as dynamic?

Avatar

Avatar

xrum

Avatar

xrum

xrum

22-12-2008

i dont think you need "then" or "endif"



your code should look something like this:



if (this.rawValue == 1)

Table1.presence = "visible";

else

Table1.presence = "hidden"

Avatar

Avatar

ibwaheemi

Avatar

ibwaheemi

ibwaheemi

22-12-2008

hi



thanks for reply



the pdf render format is dynamic at the moment it is a .xdp file.



there are no errors in the java box (ctrl J)



i do get a syntax error near token "'hidden'" on line 7



----

it is not essential that the visibility of the table be controlled by a check box. in fact it would be better if the table would autohide itself if no addInstance(1) were selected. but i dont know how to do that either

Avatar

Avatar

pguerett

Avatar

pguerett

pguerett

22-12-2008

So you do have javascript errors. The code should look like this:



if (this.rawValue == 1){

Table1.presence = "visible";

}else {

Table1.presence = "hidden"

}



Lets make it work with the checkbox 1st, then we can write a test for the addInstance (as you say).

Avatar

Avatar

ibwaheemi

Avatar

ibwaheemi

ibwaheemi

22-12-2008

thanks paul code worked a treat thanks again for help