• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

dynamic stamp java script

New Here ,
Mar 10, 2022 Mar 10, 2022

Copy link to clipboard

Copied

i have this error with the following code. What can i do 

SyntaxError: missing : after property id 

95 at line 96

  var FormRouting = {
              return: 'cancel',
              DoDialog: function() {
                  return app.execDialog(this);
              },
            
              bchk1: false,
              bchk2: false,
              bchk3: false,
              bchk4: false,

              initialize: function(dialog) {
                 var dlgInit = {
                    Chk1: this.bchk1,
                    Chk2: this.bchk2,
                    Chk3: this.bchk3,
                    Chk4: this.bchk4,
                 };

                 dialog.load(dlgInit);
              },
     
              commit: function (dialog) {
                  var oRslt = dialog.store();
     
                  this.bchk1 = oRslt['Chk1'];
                  this.bchk2 = oRslt['Chk2'];
                  this.bchk3 = oRslt['Chk3'];
                  this.bchk4 = oRslt['Chk4'];
              },

              description: {
                titlename:"personal data", align_children:"align_left", width:500, heigth:400, elements:[
                    {
                         type:"cluster", name:"data entry", align_children:"align_left", elements:[
                             {
                               type: "view",align_chilren: "align_row", elements:
                               [
                                   {
                                       type:"static_text", name:"Code A:  Approved"
                                   },
                                   {
                                         item_id:"Chk1", type:"check_box",alignment:"align_fill", width:5, heigth:20
                                   }
                               ]
                             },

                             {
                               type: "view",align_chilren: "align_row", elements:
                               [
                                   {
                                       type:"static_text", name:"Code B:  Approved As Noted"
                                   },
                                   {
                                         item_id:"Chk2", type:"check_box",alignment:"align_fill", width:5, heigth:20
                                   }
                               ]
                             },

                             {
                               type: "view",align_chilren: "align_row", elements:
                               [
                                   {
                                       type:"static_text", name:"Code C:  Revise & Resubmit"
                                   },
                                   {
                                         item_id:"Chk3", type:"check_box",alignment:"align_fill", width:5, heigth:20
                                   }
                               ]
                             },

                             {
                               type: "view",align_chilren: "align_row", elements:
                               [
                                   {
                                       type:"static_text", name:"Code D:  Rejected"
                                   },
                                   {
                                         item_id:"Chk4", type:"check_box",alignment:"align_fill", width:5, heigth:20
                                   }
                               ]
                             },
                         ]
                    },

                    {
                        alignment: "align_right",
                        type: "ok_cancel",
                        ok_name: "ok",
                        cancel_name: "cancel"
                    }
                ],
  },

if (event.source.forReal && event.source.stampName == "#stamp"){
         if('ok' == FormRouting.DoDialog()) {
             if (FormRouting.bchk1) {
                 this.getField('check box1').checkThisBox(0, true);
             }

              if(FormRouting.bchk2){
                   this.getField('check box2').checkThisBox(0, true);
              }
 
              if(FormRouting.bchk3){
                   this.getField('check box3').checkThisBox(0, true);
              }

              if(FormRouting.bchk4){
                   this.getField('check box4').checkThisBox(0, true);
              }
         }
};

 

TOPICS
Acrobat SDK and JavaScript

Views

186

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 10, 2022 Mar 10, 2022

Copy link to clipboard

Copied

LATEST

You're missing a closing curly bracket at the end of the dialog object, before:

if (event.source.forReal ...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines