नहीं है इस सवाल का जवाब स्पष्ट होना चाहिए लेकिन मैं इसेकक्षा विधि एक समारोह
यहाँदेख न है मेरी जावास्क्रिप्ट वर्ग:
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;
};
};
तो मैं instanciate
var auth = new Authentification();
alert(Authentification.ACCESS_MASTER);
alert(auth.componentAvailable);
alert(auth.isComponentAvailable());
मैं कर सकते हैं आखिरी विधि तक पहुंचें, लेकिन यह अंतिम विधि है, यह फायरबग में कहता है:
auth.is ComponentAvailable एक समारोह नहीं है .. लेकिन यह है ..
धन्यवाद
सच है, लेकिन आपको एक टिप्पणी के रूप में पोस्ट किया जाना चाहिए था - उत्तर नहीं –