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

Wo ist der Fehler? : Unexpected Value in einem Switch-Script

New Here ,
Apr 01, 2014 Apr 01, 2014

Copy link to clipboard

Copied

(Adobe Acrobat 11 prof. Windows 7 prof.)  ich bin seit Januar dilettierend dabei...

Ich möchte in einem "Ernährungs-PDF-Bilderbuch" Wissen abfragen. Mit einem Script, das in einem anderen Formular bereits funktionierte, hänge ich jetzt und komme nicht weiter.

Diese 1. Seite hat 4 Optionsfelder: die Gruppe: "Blumenkohl" mit - verschiedenen Kohlehydratmengen (0-3 KE als Optionsfeldauswahl).

Das Script steht in einem zugehörigen Textfeld ("Blumenkohl-KH") in einem benutzerdefinierten Berechnungsscript. Format: "Keine":

Das Script lautet:

var cSelection = this.getField("Blumenkohl").value;

switch (cSelection)

{

   case "0":

     event.value = "Richtig! Blumenkohl hat 0 KE ";

     break;

   case "1":

     event.value = " 1 KE ist falsch! Blumenkohl hat 0 KE ";

     break;

   case "2":

     event.value = "2  KE ist falsch! Blumenkohl hat 0 KE ";

     break;

   case "3":

     event.value = "3 KE ist falsch! Blumenkohl hat 0 KE ";

     break;

   case "Off":

     event.value = "Keine Antwort: Fehler! Blumenkohl hat 0 KE ";

     break;

   default:

     // This option should never be called since

     // all possible cased are handled

     event.value = "Unexpected Value: " + cSelection;

     break;

}

Nach dem Reset erhalte ich erwartungsgemäß die Auswertung: Keine Antwort: Fehler! Blumenkohl hat 0 KE!

Ich kann alle Optionsfelder anklicken, aber ich erhalte immer  "Unexpected Value: " mit dem zugehörigen "cSelection"-Wert.

zuvor kamen Fehlermeldungen, wie:

ReferenceError: SetFieldValues is not defined

SetFieldValues is not defined

nachdem ich ein Leerzeichen zwischen switch und (cSelection) eingefügt habe, kommen jetzt gar keine Fehlermeldungen mehr. Dennoch bleibt die Fehlausgabe "Unexpected Value: ...", ohne dass ich den Grund für das Nichtfunktionieren erkennen kann.

Danke für die Rückmeldungen.

chris.sberg

Views

698

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 ,
Apr 01, 2014 Apr 01, 2014

Copy link to clipboard

Copied

Could you please post the link that led you to this forum address?

This forum is only to discuss how the forums operate, not products

If you start at the Forums Index http://forums.adobe.com/index.jspa

You will be able to select a forum for the specific Adobe product(s) you use

Click the "down arrow" symbol on the right (where it says ALL FORUMS) to open the drop down list and scroll

http://forums.adobe.com/community/acrobat

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
Community Expert ,
Apr 01, 2014 Apr 01, 2014

Copy link to clipboard

Copied

Chris,

It seems that your thread has been moved to the wrong forum.

I would suggest your copying the whole original post and reposting it in the Acrobat forum, using the link that John gave you in the first post.

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
LEGEND ,
Apr 01, 2014 Apr 01, 2014

Copy link to clipboard

Copied

Es gibt auch ein deutsches Forum: http://forums.adobe.com/community/international_forums/deutsche

Aber wir möchten gern wissen: wie kommen Sie (und viele andere) mit Ihrem Post ins Forum-Comments Forum?

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
New Here ,
Apr 03, 2014 Apr 03, 2014

Copy link to clipboard

Copied

Hallo, Herr Willener,

ich bin hier ganz neu, frisch angemeldet.

Die Aufteilung in die spezifischen Foren war mit nicht klar.

Ich habe, nachdem ich mich neu angemeldet hatte, sofort diese Frage gestellt (stellen können; es gab keine Abfrage, in welchem Forum ich die Frage stellen möchte) und bin so wohl in diesem Forum "aufgeschlagen". Entschuldigung!

Mit freundlichen Grüßen

chris.sberg

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
LEGEND ,
Apr 04, 2014 Apr 04, 2014

Copy link to clipboard

Copied

Sie haben nichts falsch gemacht; keine Ursache für eine Entschuldigung!

Wir versuchen nur herauszufinden weshalb so viele Leute hier landen anstelle einem Produkt-spezifischen forum.  Ich werde Ihren Anleitungen folgen, dann sehe ich wo ich lande.

Aber m...

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
LEGEND ,
Apr 04, 2014 Apr 04, 2014

Copy link to clipboard

Copied

LATEST

[falscher Knopf gedrückt]

Aber möglicherweise erübrigt sich das alles, da nächste Woche eine neue Version der Forum Software installiert wird.

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