CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Syntax Error: missing : after property id

  1. #1
    Join Date
    Nov 2014
    Posts
    3

    Syntax Error: missing : after property id

    Im very new to this and I am attempting to auto-fill fields in Adobe Acrobat Pro by selecting an item from a drop down menu. I followed a how-to here https://acrobatusers.com/tutorials/change_another_field
    I changed the values so it would work with my document but I keep getting "syntax error: missing: after property id" Again, I am new to this so I apologize for any procedural missteps.

    // Place all pre-population data into a single data structure!
    var POCO = { 5905-16:{ Model: "VMC 40", Serial: "9502956"}, 5905-13:{ Model: "VMC 40", Serial: "8803280"}, 5905-17 :{ Model: "4020", Serial: "8704778"}, 5905-30:{ Model: "6030", Serial: "12000101549"}, 5905-18 :{ Model: "8030", Serial: "9705016"}, 5905-22 :{ Model: "4020", Serial: "8803275"}, 5905-14 :{ Model: "VMC 40", Serial: "891819"}, 5905-15 :{ Model: "VMC 40", Serial: "9502954"}, 5905-23 :{ Model: "4020", Serial: "9910369"}, 5905-10 :{ Model: "VMC 40", Serial: "8803280"}, 5905-11 :{ Model: "4020", Serial: "8912817"}, 5905-20 :{ Model: "4020", Serial: "9801177"}, 5905-28 :{ Model: "VMC 40", Serial: "9101912"}, 5905-29 :{ Model: "4020", Serial: "9807346"}, 5905-12 :{ Model: "4020", Serial: "8912818"}, 5905-19 :{ Model: "6030", Serial: "9709227"}, 5905-24 :{ Model: "6030", Serial: "9910370"}, 5905-21 :{ Model: "4020", Serial: "9801176"}, 5905-34 :{ Model: "VMC 4020 HT", Serial: "32004066433"}, 5905-33 :{ Model: "VMC 4020 HT", Serial: "32004086742"}}; function SetFieldValues(cDeptName) {
    // Populate fields with values from the POCO Object!
    this.getField(“Model”).value = POCO[cDeptName].Model;
    this.getField(“Serial”).value = POCO[cDeptName].Serial
    }

  2. #2
    Join Date
    Jun 1999
    Location
    Eastern Florida
    Posts
    3,865

    Re: Syntax Error: missing : after property id

    Is this javascript code? This is a java forum.
    Norm

  3. #3
    Join Date
    Nov 2014
    Posts
    3

    Re: Syntax Error: missing : after property id

    Quote Originally Posted by Norm View Post
    Is this javascript code? This is a java forum.
    It is Java. Its inside the Adobe Acrobat program. Adobe uses Java for custom keystroke scripts.

  4. #4
    Join Date
    Jun 1999
    Location
    Eastern Florida
    Posts
    3,865

    Re: Syntax Error: missing : after property id

    This part does not look like java:
    Code:
    var POCO = ..
    Norm

  5. #5
    Join Date
    Nov 2014
    Posts
    3

    Re: Syntax Error: missing : after property id

    Quote Originally Posted by Norm View Post
    This part does not look like java:
    Code:
    var POCO = ..
    No sir, I just followed the tutorial.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)