clicking on of the buttons calls the proper javascript function, which makes the http request, and dumps that into the "admin_box" div
here is the javascript:
Code:
function createRequestObject() {
var ro;
var browser = navigator.appName;
if(browser == "Microsoft Internet Explorer"){
ro = new ActiveXObject("Microsoft.XMLHTTP");
}else{
ro = new XMLHttpRequest();
}
return ro;
}
var http = createRequestObject();
function getUsers() {
http.open('get', 'rpc/users.php?rand=' + Math.random() );
http.onreadystatechange = handleAdmin;
http.send(null);
}
function getTests() {
http.open('get', 'rpc/tests/main.php?rand=' + Math.random() );
http.onreadystatechange = handleAdmin;
http.send(null);
}
function getUnlock() {
http.open('get', 'rpc/unlock.php?rand=' + Math.random());
http.onreadystatechange = handleAdmin;
http.send(null);
}
function getGrade() {
http.open('get', 'rpc/grade.php?rand=' + Math.random());
http.onreadystatechange = handleAdmin;
http.send(null);
}
function getActive() {
http.open('get', 'rpc/active.php?rand=' + Math.random());
http.onreadystatechange = handleAdmin;
http.send(null);
}
function handleAdmin() {
if (http.readystate == 4) {
document.getElementById('admin_box').innerHTML = http.responseText;
}
}
All of this works perfectly fine in IE6, but not in Firefox.
In firefox the buttons show up, but if you click any of them, nothing happens at all. An no errors show in the error console.
The thing that really bothers me about this is there is another part of my web site that works fine in firefox and it uses IDENTICAL javascript (with the exception of URLs of course).
If anyone could give me any guidance on this issue, I would be extremely grateful.
Thank you for your time
Last edited by PeejAvery; October 22nd, 2008 at 05:47 PM.
Reason: Added code tags
Bookmarks