These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

SelectBox.rawValue JavaScript not working in PDF Form

Subha
Registered: May 1 2009
Posts: 11

Hi All,

I am new to this technology and struck up with the below issue. Please guide me in finding a solution.

Scenario 1 (Creating new PDF):

I had created a PDF Acro form (NOT a XFA form) using LiveCycle designer. The form has a checkbox, textfield and button. On Click of the button (Save), I am doing the below validation; This validation is working fine. In the server side, I am using a Java (Servlet) to save the PDF to FileSystem.

********************

form1.#subform[0].Button1::mouseDown - (JavaScript, both)

if(CheckBox1.rawValue == 0) {
app.alert({
cMsg: "Warning! Enter the value for Checkbox",
cTitle: "Checkbox"
});
CheckBox1.border.edge.color.value = "255,0,0";

} else {
myDoc.submitForm({
cURL: "http://localhost:9080/FDF_Examples/SavePDFAction",
cSubmitAs: "XFDF"
});

}

*********************

Scenario 2 (Editing a Saved PDF):

I opened the above saved PDF in a browser. The checkbox in the PDF is displaying as "Checked". But
when I click the button (Save), the javascript displays my validation message "Warning! Enter the value for Checkbox".

Even though the checkbox is "checked", the javascript code "CheckBox1.rawValue" is returning a value (0).

When I deselect and select again the checkbox, the javascript code "CheckBox1.rawValue" is returning a value (1).

*********************

Is there any other way to find if the checkbox is selected? Please let me know your thoughts and suggestions. Appreciate your support.

Subha.

My Product Information:
LiveCycle Designer, Windows
Dimitri
Expert
Registered: Nov 1 2005
Posts: 1389
Hi Subha,

You cannot create an AcroForm in LiveCycle Designer. AcroForms are created in Acrobat alone and XFA PDF forms are created in LiveCycle Designer. The two are completely separate applications.

Hope this helps,

Dimitri
WindJack Solutions
www.windjack.com
www.pdfscripting.com
Subha
Registered: May 1 2009
Posts: 11
Hi Dimitri,

Thank you very much for your reply. But while browsing the help document of LiveDesigner, I found that it supports both Acroform (Static PDF form) and XFA form. Correct me if my understanding is different.

I am going through some support documents and will come back soon to post my question. Appreciate the support provided by this voluter group.

Thank you.
Dimitri
Expert
Registered: Nov 1 2005
Posts: 1389
Hi Subha,

Saving a LiveCycle Designer form as a "Static PDF" does not mean it is an AcroForm. It is still an XFA PDF, it just does not have dynamic features. Is the terminology "Static PDF" the only reason you believe it is an AcroForm? Please post the text from the Help file that says otherwise, as I would like to see what made you think so.

Hope this helps,

Dimitri
WindJack Solutions
www.pdfscripting.com
www.windjack.com