View Single Post
08-26-2008, 05:54 PM
#1
Raphy is offline Raphy
Raphy's Avatar
Status: Member
Join date: Aug 2008
Location: Boca Raton, FL
Expertise:
Software:
 
Posts: 146
iTrader: 4 / 100%
 

Raphy is on a distinguished road

Send a message via AIM to Raphy Send a message via MSN to Raphy Send a message via Skype™ to Raphy

  Old  Need some help with AJAX in IE

Hey guys, I'm trying to make a dynamic AJAX product updater that displays products based on the brand the user selects from a form drop menu. The following function works perfectly on Safari and Firefox, but on IE I get a 'Object Expected' error and I have NO idea on how to fix it. Does anyone here know how I could go about fixing this? The function I have is below.

Thanks for the help in advance.

Code:
function updateSkinCare() {
brandName = document.getElementById('searchTypeSkin').value;
emailValue = document.getElementById('clientEmail').innerHTML;
// AJAX CALL
var PageRequest = false;
if(window.XMLHttpRequest)pageRequest = new XMLHttpRequest();
else if(window.ActiveXObject) pageRequest = new ActiveXObject("Microsoft.XMLHTTP");
else return false;
pageRequest.onreadystatechange = function() {
if(pageRequest.readyState == 4 || pageRequest.readyState == "complete")  {
document.getElementById('skincarecontent').innerHTML = pageRequest.responseText;
  }
}
pageRequest.open('GET', "brandprodisplay.php?type=skincare&brand=" +brandName +"&email=" +emailValue, true);
pageRequest.send(null);
}