Hallo
Ich wollt aus einem Script der mir die Ausgabe in einem Table ausgibt
das
mit
auslesen, und in var einlesen
und mit einer IF vergleichen.
Results gibt ein true oder false aus nur bekomme ich es nicht in meine If rein
HELP PLEASE
EDIT:
Hier noch die JS
Ich wollt aus einem Script der mir die Ausgabe in einem Table ausgibt
Code:
<table id="results" >
Code:
id="results"
Code:
document.getElementById('results').value;
Code:
var ll = document.getElement('results').value ;
Code:
if( 1 == ll ){ alert("on"); } else { alert("off"); }
HELP PLEASE
EDIT:
Hier noch die JS
Code:
function Pinger() { this.ip = ''; this.inUse = false; this.callback = null; //time holders this.start = null; this.end = null; //image object this.img = null; this.timer = null; } function Pinger_ping(ip, callback) { if(!this.inUse) { this.inUse = true; this.callback = callback this.ip = ip; var _that = this; this.img = new Image(); this.img.onload = function() {_that.good();}; this.img.onerror = function() {_that.good();}; this.start = new Date().getTime(); this.img.src = "http://" + ip; this.timer = setTimeout(function() { _that.bad();}, 1500); } } function Pinger_good() { if(this.inUse) { this.inUse = false; this.end = new Date().getTime(); //clear the timer & img clearTimeout(this.timer); this.img = null; this.callback(this.ip,true, this.end - this.start); } } function Pinger_bad() { if(this.inUse) { this.inUse = false; this.end = new Date().getTime(); //clear the timer & img clearTimeout(this.timer); this.img = null; this.callback(this.ip,false, this.end - this.start); } } Pinger.prototype.ping = Pinger_ping; Pinger.prototype.good = Pinger_good; Pinger.prototype.bad = Pinger_bad;
Kommentar