Name.border.edge.color.value = “0,0,255″;
Name.border.edge.color.value = “255,255,255″;
Name.border.edge.color.value = “0,0,255″;
Name.border.edge.color.value = “255,255,255″;
Das folgende Skript, das speziell für die Schaltfläche „Daten überprüfen“ konzipiert wurde, stellt anhand einiger Überprüfungsschritte fest, ob die erforderlichen Felder Daten enthalten. Dabei wird jedes Feld einzeln überprüft und festgestellt, ob der Feldwert nicht null oder eine leere Zeichenfolge ist. Ist der Feldwert null oder eine leere Zeichenfolge, wird ein Hinweis eingeblendet, welcher den Benutzer daran erinnert, dass dieses Feld ausgefüllt werden muss. Gleichzeitig wird die Hintergrundfarbe des Füllbereichs in Rot geändert.
if ((Name.rawValue == null) || (Name.rawValue == “”)) {
xfa.host.messageBox(“Please enter a value in the Name field.”);
xfa.resolveNode(“Name.ui.#textEdit.border.edge”).stroke =”solid”;
xfa.resolveNode(“Name.ui.#textEdit.border.fill.color”).value =”255,100,50″;
// Set the variable to indicate that this field does not contain data.
// Reset the fillable area of the text field.
xfa.resolveNode(“Name.ui.#textEdit.border.edge”).stroke =”lowered”;
xfa.resolveNode(“Name.ui.#textEdit.border.fill.color”).value =”255,255,255″;
if ((Address.rawValue == null) || (Address.rawValue == “”)) {
xfa.host.messageBox(“Please enter a value in the Address field.”);
xfa.resolveNode(“Address.ui.#textEdit.border.edge”).stroke =”solid”;
xfa.resolveNode(“Address.ui.#textEdit.border.fill.color”).value =”255,100,50″;
xfa.resolveNode(“Address.ui.#textEdit.border.edge”).stroke =”lowered”;
xfa.resolveNode(“Address.ui.#textEdit.border.fill.color”).value =”255,255,255″;
if ((City.rawValue == null) || (City.rawValue == “”)) {
xfa.host.messageBox(“Please enter a value in the City field.”);
xfa.resolveNode(“City.ui.#textEdit.border.edge”).stroke =”solid”;
xfa.resolveNode(“City.ui.#textEdit.border.fill.color”).value =”255,100,50″;
xfa.resolveNode(“City.ui.#textEdit.border.edge”).stroke =”lowered”;
xfa.resolveNode(“City.ui.#textEdit.border.fill.color”).value =”255,255,255″;
if ((State.rawValue == null) || (State.rawValue == “”)) {
xfa.host.messageBox(“Please enter a value in the State field.”);
xfa.resolveNode(“State.ui.#textEdit.border.edge”).stroke =”solid”;
xfa.resolveNode(“State.ui.#textEdit.border.fill.color”).value =”255,100,50″;
xfa.resolveNode(“State.ui.#textEdit.border.edge”).stroke =”lowered”;
xfa.resolveNode(“S
tate.ui.#textEdit.border.fill.color”).value =”255,255,255″;
if ((ZipCode.rawValue == null) || (ZipCode.rawValue == “”)) {
xfa.host.messageBox(“Please enter a value in the Zip Code field.”);
xfa.resolveNode(“ZipCode.ui.#textEdit.border.edge”).stroke =”solid”;
xfa.resolveNode(“ZipCode.ui.#textEdit.border.fill.color”).value =”255,100,50″;
xfa.resolveNode(“ZipCode.ui.#textEdit.border.edge”).stroke =”lowered”;
xfa.resolveNode(“ZipCode.ui.#textEdit.border.fill.color”).value =”255,255,255″;
if ((Country.rawValue == null) || (Country.rawValue == “”)) {
xfa.host.messageBox(“Please enter a value in the Country field.”);
xfa.resolveNode(“Country.ui.#textEdit.border.edge”).stroke =”solid”;
xfa.resolveNode(“Country.ui.#textEdit.border.fill.color”).value =”255,100,50″;
xfa.resolveNode(“Country.ui.#textEdit.border.edge”).stroke =”lowered”;
xfa.resolveNode(“Country.ui.#textEdit.border.fill.color”).value =”255,255,255″;
xfa.host.messageBox(“Thank you for inputting your information.”);