Highlighted

problem with hidden/invisible table

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

Highlighted

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"
Highlighted

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
Highlighted

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).