Highlighted

buttons linking to masterpages and designs do mistakes (or i did)

Avatar

14-01-2009

Hi there,

i produced this form and while the "Kopfgrafik" Checkbox is supposed to switch the top layout off, the "Fussgrafik" Checkbox is supposed to switch the bottom(masterpage) layout off.

That sounds simple and the code so far is too:



[[letter.master.page_1.chb_head::change - (JavaScript, client)]]



if (this.rawValue == true) {

letter.head.img_head_1.presence = "visible";

letter.head.img_subject_1.presence = "visible";

} else if (this.rawValue == false) {

this.rawValue = false;

letter.head.img_head_1.presence = "invisible";

letter.head.img_subject_1.presence = "invisible";

}



[[letter.master.page_1.chb_foot::change - (JavaScript, client)]]



if (this.rawValue == true) {

letter.master.page_1.img.img_foot_1.presence = "visible";

letter.master.page_n.img.img_foot_n.presence = "visible";

} else if (this.rawValue == false) {

this.rawValue = false;

letter.master.page_1.img.img_foot_1.presence = "invisible";

letter.master.page_n.img.img_foot_n.presence = "invisible";

}



b Try following: Uncheck "Fussgrafik" and then uncheck "Kopfgrafik", which causes "Fussgrafik" to appear again(?!) How is it possible?



Note1:

Actually i don't want these buttons to be seperated, but it was the only way to get it working like it does now.

Note2:

When using that method of setting an object invisible in the beginning and then by script again visible, that object just disappears when another page is created (the content is extensible).

Note3:

Link to the pdf file: http://www.file-upload.net/download-1379569/maf.pdf.html

Note4: I use LiveCycle ES and Adobe Reader 9



Thanks,

Helge

Replies

Highlighted

Avatar

15-01-2009

there is a workaround(in general found out by Paul), to just hide the headlayout with the button, and for the footlayout to have invisible textfield with white backgroundcolor above that is set visible on the calculate event:



letter.master.page_1.hide_foot_1::calculate - (Javascript, Client)



if(letter.head.img_head_1.presence == "invisible") {

letter.master.page_1.hide_foot_1.presence = "visible";

} else {

letter.master.page_1.hide_foot_1.presence = "invisible";

}



i think the important thing about this is that the two commands (one in masterpage, one in designsubforms) are seperated and each located in it's part of the document

mysterious..