Funktionalität im Web-Modul – Beispiel

You are here:
< All Topics
{
    init: function() {
        $("form#viewer input[name=Vorname]").click( function(){
            alert ("das Feld  Vorname wurde angeklickt");
        });
        $("form#viewer input[name=Nachname]").click( function(){
            alert ("das Feld Nachname wurde angeklickt");
        });         
    }
}

Auch für das Web-Module ist es möglich, Code und damit Funktionalität zu hinterlegen.

Der Aufbau sieht exemplarisch wie folgt aus:

Beispiel:

{

init:   function() {

        $("form#viewer div[name=Upload_Vorderseite]").css("background-color", "white");
        $("form#viewer input[name=Upload_Vorderseite]").hide();
        $("form#viewer div[name=Upload_Rueckseite]").css("background-color", "white");
        $("form#viewer input[name=Upload_Rueckseite]").hide();
        $("form#viewer div[name=PC_fileupload_vorder]").css("background-color", "white");
        $("form#viewer input[name=PC_fileupload_vorder]").hide();
        $("form#viewer div[name=PC_fileupload_rueck]").css("background-color", "white");
        $("form#viewer input[name=PC_fileupload_rueck]").hide();

        $("form#viewer div[name=PC_image_vorder]").css("background-color", "white");
        $("form#viewer input[name=PC_image_vorder]").hide();
        $("form#viewer div[name=PC_image_rueck]").css("background-color", "white");
        $("form#viewer input[name=PC_image_rueck]").hide();
        $("form#viewer div[name=Kamera_Vorderseite]").css("background-color", "white");
        $("form#viewer input[name=Kamera_Vorderseite]").hide();
        $("form#viewer div[name=Kamera_Rueckseite]").css("background-color", "white");
        $("form#viewer input[name=Kamera_Rueckseite]").hide();
        $("form#viewer div[name=PC_image_vorder]").css("border", "white");
        $("form#viewer div[name=PC_image_rueck]").css("border", "white");

        $("form#viewer input[name=foto_upload]").click(function(){

            if ($("form#viewer input[name=foto_upload]").prop("checked")){
                $("form#viewer div[name=Upload_Vorderseite]").css("background-color", "#ccc");
                $("form#viewer input[name=Upload_Vorderseite]").show();
                $("form#viewer div[name=Upload_Rueckseite]").css("background-color", "#ccc");
                $("form#viewer input[name=Upload_Rueckseite]").show();
                $("form#viewer div[name=PC_fileupload_vorder]").css("background-color", "#ccc");
                $("form#viewer input[name=PC_fileupload_vorder]").show();
                $("form#viewer div[name=PC_fileupload_rueck]").css("background-color", "#ccc");
                $("form#viewer input[name=PC_fileupload_rueck]").show();
            } else {
                $("form#viewer div[name=Upload_Vorderseite]").css("background-color", "white");
                $("form#viewer input[name=Upload_Vorderseite]").hide();
                $("form#viewer div[name=Upload_Rueckseite]").css("background-color", "white");
                $("form#viewer input[name=Upload_Rueckseite]").hide();
                $("form#viewer div[name=PC_fileupload_vorder]").css("background-color", "white");
                $("form#viewer input[name=PC_fileupload_vorder]").hide();
                $("form#viewer div[name=PC_fileupload_rueck]").css("background-color", "white");
                $("form#viewer input[name=PC_fileupload_rueck]").hide();
            }
        });

        $("form#viewer input[name=foto_kamera]").click(function(){

            if ($("form#viewer input[name=foto_kamera]").prop("checked")){
                $("form#viewer div[name=PC_image_vorder]").css("background-color", "#ccc");
                $("form#viewer input[name=PC_image_vorder]").show();
                $("form#viewer div[name=PC_image_rueck]").css("background-color", "#ccc");
                $("form#viewer input[name=PC_image_rueck]").show();
                $("form#viewer div[name=Kamera_Vorderseite]").css("background-color", "#ccc");
                $("form#viewer input[name=Kamera_Vorderseite]").show();
                $("form#viewer div[name=Kamera_Rueckseite]").css("background-color", "#ccc");
                $("form#viewer input[name=Kamera_Rueckseite]").show();
                $("form#viewer div[name=PC_image_vorder]").css("border", "blue");
                $("form#viewer div[name=PC_image_rueck]").css("border", "blue");
            } else {
                $("form#viewer div[name=PC_image_vorder]").css("background-color", "white");
                $("form#viewer input[name=PC_image_vorder]").hide();
                $("form#viewer div[name=PC_image_rueck]").css("background-color", "white");
                $("form#viewer input[name=PC_image_rueck]").hide();
                $("form#viewer div[name=Kamera_Vorderseite]").css("background-color", "white");
                $("form#viewer input[name=Kamera_Vorderseite]").hide();
                $("form#viewer div[name=Kamera_Rueckseite]").css("background-color", "white");
                $("form#viewer input[name=Kamera_Rueckseite]").hide();
                $("form#viewer div[name=PC_image_vorder]").css("border", "white");
                $("form#viewer div[name=PC_image_rueck]").css("border", "white");
            }
        });

}

}

Weiter Signatur mittels SMS-Code zusätzlich absichern
Table of Contents