The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I cannot seem to get this function to load the page in Internet Explorer, but it will in Firefox. I really cannot figure this one out. It's day two of problem shooting, and I just am stumped. Below is the function.
Code:
<script>
function statusEnableDisable(page,usediv, form)
{
// Set up request varible
try {
xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e) {
alert("Error: Could not load page.");
}
if(form == "photoalbum"){
var object = document.getElementById('photoalbum').selectedIndex;
if(object == "1"){
status = "Enabled";
}
else if(object == "2"){
status = "Disabled";
}
}
else if(form == "file"){
var object = document.getElementById('filestorage').selectedIndex;
if(object == "1"){
status = "Enabled";
}
else if(object == "2"){
status = "Disabled";
}
}
page = page + "status=" + status;
page = page + "&form=" + form;
alert(page);
//Show page is loading
document.getElementById(usediv).innerHTML = 'Loading Page...';
//scroll to top
scroll(0,0);
//send data
xmlhttp.onreadystatechange = function(){
//Check page is completed and there were no problems.
if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {
//Write data returned to page
document.getElementById(usediv).innerHTML = xmlhttp.responseText;
}
}
xmlhttp.open("GET", page);
xmlhttp.send(null);
//Stop any link loading normaly
return false;
}
</script>
If anyone can spot anything that might be causing this to fail in Internet Explorer, I would appreciate the advice. Thank you |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|