I'm trying to display the time it takes a function to complete in javascript, and then display the time in an alert window that is called on button click, however the alert box doesn't pop up at all when I click the INFO button:
var xmlhttp;
function loadXMLDoc()
{
var start= new Date().getTime();
//loadxmldoc function
return new Date().getTime()-start;
}
function firebug(){
alert("Status: "+xmlhttp.status+" "+xmlhttp.statusText+"\nReady State: "+xmlhttp.readyState+"\nRequest Method: "+document.getElementById("selector2").value+"\nTime: "loadXMLDoc().getTime());
}
</script>
Button Html:
<button id="btn3" type="button" class="btn btn-warning" style="margin-top:5px;" onclick="firebug();"><span class="glyphicon glyphicon-signal"></span> INFO</button>
I have a html table with a row that looks like: <tr> <td><input type="checkbox" name="check[]" value="265"></td> <td>265</td> <td>NO MATCH</...
I have a html table with a row that looks like: <tr> <td><input type="checkbox" name="check[]" value="265"></td> <td>265</td> <td>NO MATCH</...
I'm following a book, and using this version of Angular: https://ajax.googleapis.com/ajax/libs/angularjs/1.2.6/angular.js[1] This is my template: <div ng-controller="ParentController"> <...
I'm following a book, and using this version of Angular: https://ajax.googleapis.com/ajax/libs/angularjs/1.2.6/angular.js[1] This is my template: <div ng-controller="ParentController"> <...
I have a div that I need to hide when an option is selected in an option, below is my current html: Type:<select name="Type" id="Type"> <option value="choice">Multiple choice</...
I have a div that I need to hide when an option is selected in an option, below is my current html: Type:<select name="Type" id="Type"> <option value="choice">Multiple choice</...
So I want to swap two div elements that have a CKEditor inside. I viewed some of the previous questions and tried to do it that way. It's all OK, the elements are swapped. But one of the elements ...
So I want to swap two div elements that have a CKEditor inside. I viewed some of the previous questions and tried to do it that way. It's all OK, the elements are swapped. But one of the elements ...