PDA

View Full Version : Elements not showing up in IE



BillyBoB6969
03-15-2009, 02:39 AM
I have a blog system made mostly with javascript and php+mysql. The login system is what I'm trying to fix on IE. On firefox, on the other hand, it all works just fine. What it's supposed to do is when someone logs in it adds Edit and Remove imgs to the top of each of their posts.

The javascript corresponding with the errors:


function loginUser(Username, Password) {
var responseObj = document.getElementById('LoginResponse');

var lUsername = document.getElementById(Username).value;
var lPassword = document.getElementById(Password).value;
if(sendReq.readyState == 4 || sendReq.readyState == 0) {
sendReq.open("POST",'includes/loginUser.php?username='+lUsername+'&password='+lPassword, true);
sendReq.onreadystatechange = function() {
if(sendReq.responseText=="false") {
document.getElementById('LoginInner').style.display = "none";
document.getElementById('LoginInner').style.visibility = "hidden";
clearObj(responseObj);
responseObj.appendChild(document.createTextNode("The login process failed, your username or password couldn't be found in the database."));
hideObj = document.createElement("a");
hideObj.onmousedown = function() {
responseObj.style.display = "none";
responseObj.style.visibility = "hidden";
showLogin();
}
hideObj.appendChild(document.createTextNode("Hide Message"));
brObj = document.createElement("br");
responseObj.appendChild(brObj);
responseObj.appendChild(hideObj);
responseObj.style.display = "block";
responseObj.style.visibility = "visible";
}else{
secCode = sendReq.responseText.substr(0, 5);
var uID = sendReq.responseText.substr(5);
if(secCode&&uID) {
showLogin();
makeBtns(uID);
}
}
}
sendReq.send(null);
}
}

function makeBtns(userID) {
if(sendReq2.readyState == 4 || sendReq2.readyState == 0) {
sendReq2.open("POST",'includes/getPosts.php?userID='+userID+'&secCode='+secCode, true);
sendReq2.onreadystatechange = function() {
if(sendReq2.readyState == 4) {
var xmlDoc = sendReq2.responseXML.documentElement;
var i = 0;
var items = xmlDoc.getElementsByTagName("entry");
var o = [];
var iEdit = [];
var iRemove = [];
while(i<items.length) {
var posID = items[i].firstChild.textContent;
iEdit[i] = document.createElement("img");
iEdit[i].pID = items[i].attributes[0].textContent;
iEdit[i].dID = posID;
iEdit[i].id = 'EditImg'+iEdit[i].pID;
iEdit[i].src = "images/EditBtn.jpg";
iEdit[i].alt = "Edit";
iEdit[i].onmousedown = function() {
setupEditBlog(this.dID , this.pID, secCode);
}
iRemove[i] = document.createElement("img");
iRemove[i].src = "images/RemoveBtn.jpg";
iRemove[i].alt = "Remove";
o[i] = document.getElementById('BlogO'+posID);
clearObj(o[i]);
o[i].appendChild(iEdit[i]);
o[i].appendChild(document.createTextNode(" "));
o[i].appendChild(iRemove[i]);
i++;
}
}
}
sendReq2.send(null);
}
}


My site is located: My Site (http://dreamshowstudios.net/development/Blog/index.php).

The login info is: Admin - 1234
Once logged in it should add these imgs in FF, but not in IE(tested in 6 and 7).

Any help is greatly appreciated!
Thanks in advance,
Cean

BillyBoB6969
03-16-2009, 04:22 AM
Has nobody ever seen this before? Any input is great.