- Klasse-Methode in javascript keine Funktion

Die Antwort muss offensichtlich sein, aber ich dont sehen es

hier ist mein javascript-Klasse :

var Authentification = function() {
        this.jeton = "",
        this.componentAvailable = false,
        Authentification.ACCESS_MASTER = "http://localhost:1923",

        isComponentAvailable = function() {
            var alea = 100000*(Math.random());

            $.ajax({
               url:  Authentification.ACCESS_MASTER + "/testcomposant?" + alea,
               type: "POST",
               success: function(data) {
                   echo(data);
               },
               error: function(message, status, errorThrown) {
                    alert(status);
                    alert(errorThrown);
               }
            });

            return true;
        };
    };

dann habe ich instantiieren

var auth = new Authentification();

alert(Authentification.ACCESS_MASTER);    
alert(auth.componentAvailable);
alert(auth.isComponentAvailable());

Kann ich erreichen, alles, aber die Letzte Methode, heißt es in firebug :

auth.isComponentAvailable ist nicht eine Funktion .. aber es ist..

Danke

InformationsquelleAutor mlwacosmos | 2013-04-17
Schreibe einen Kommentar