Skip to main content
Participating Frequently
July 25, 2008
Question

script error

  • July 25, 2008
  • 14 replies
  • 1143 views
{ var theCodes = [[1096971116, ["absolute", "absolute numbering"]], nbsp; [1935897710, ["section", "section numbering"]]];
This topic has been closed for replies.

14 replies

Participating Frequently
July 28, 2008
The complete coding is given below:

app.generalPreferences.pageNumbering = [PageNumberingOptions.section,
PageNumberingOptions.absolute][0];
alert(decodePageNumbering(app.generalPreferences.pageNumbering,true));
function decodePageNumbering(theCode,verbose)
{ var theCodes = [[1096971116, ["absolute", "absolute numbering"]],   [1935897710, ["section", "section numbering"]]];
var verbosePtr = 0; if (verbose) { verbosePtr = 1 }
switch (theCode)
{ case PageNumberingOptions.absolute :
return theCodes[0][1][verbosePtr];
case PageNumberingOptions.section :
return theCodes[1][1][verbosePtr];
default : throw (String(theCode) + "not recognized") }}

Script Description: This script is intended to display page numbers staring from 0.However it is not woking and is giving the following error on running:

Java Script Error
Error number :25
Line : 5
Source:{ var theCodes = [[1096971116, ["absolute", "absolute numbering"]], nbsp;[1935897710, ["section", "section numbering"]]];
Offending Text: ;

After removing the   a dialog box with " Section Numbering " written on it is displayed....

Please help me in debugging this code....

THANKS
Inspiring
July 25, 2008
So what is the error message? That line is an incomplete fragment from something larger and there isn't enough context for us to evaluate it. The nbsp; is definitely wrong and shouldn't be there.

Dave
Participating Frequently
July 25, 2008
its not the error.... i checked, thanks anyways
Known Participant
July 25, 2008
maybe "nbsp;" ??

robin

--
www.adobescripts.com