0

Below is a code I'm running for a pop-up dialogue on a stamp within Acrobat to fill fields accordingly. I keep getting the error "Syntax Error: missing : after property id 5: at line 6" which is var dlg = { I need some help to identify why this error is occuring, as I've scoured references online and in books that do not suggest any other means of inputting this code. Most appear exactly the same yet do not note that it yields an error. Any input/advice would be greatly appreciated.

Thanks.

if (event.source.forReal && (event.source.stampName == "#zRDpMLeWiU3cBdoQxdhwZA")) 
{
    if("ok" ==app.execDialog(dlg))
    {
        var oList = {
            NO EXCEPTIONS TAKEN: -1, 
            REJECTED - SEE REMARKS: -1, 
            RECEIPT ACKNOWLEDGED: -1, 
            ACCEPTED EXCEPT AS NOTED: -1, 
            AMEND AND RESUBMIT: -1, 
            RESUBMIT FOR RECORD: -1 };
        
        var dlg = {
            initialize: function(dialog) {
                            dialog.load({lst1:oList});
                        },
            commit: function(dialog)v{
                        this.oSelect = dialog.store() .lst1;
                    },
            description: {
                name:"Review Action"
                elements:[
                    {type:"view", elements:[
                                   {type:"static_text", item_id:"stat", name:"Select an Item"},
                                   {type:"popup", item_id:"lst1", char_width:6},
                                   {type:"ok"}
                                  ]
                    }]
            )}
};
Jongware
  • 22,200
  • 8
  • 54
  • 100

1 Answers1

0

After re-formatting your codes with proper indentation, there are a few things missing:

  1. A comma after description:name:"Review Action".
  2. Missing closing curly bracket } for description.
  3. There is an extra closing bracket ) after description.
  4. Missing closing curly bracket } for the nested if statement.
  5. Probably don't need the last semi-colon ; after the closing bracket.
  6. There is a weird v after commit: function dialog().

Hope at least one of them helps. :)

ivan.sim
  • 8,972
  • 8
  • 47
  • 63