I've got the exact same problem in IE, except adding a random number to the url isnt helping, any ideas?
Code:
var xmlHttp
var field
function suggest_weight()
{
frame = document.getElementById('users_frame_size')[document.getElementById('users_frame_size').selectedIndex].value;
height_feet = document.getElementById('users_height_feet')[document.getElementById('users_height_feet').selectedIndex].value;
height_inches = document.getElementById('users_height_inches')[document.getElementById('users_height_inches').selectedIndex].value;
url = '/suggest_weight.php?frame='+frame+'&height_feet='+height_feet+'&height_inches='+height_inches;
changeField(url, 'users_goal_weight');
}
function changeField(url,fieldName)
{
field = fieldName;
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url+'&rand='+Math.floor(Math.random()*100),true);
xmlHttp.send(null);
}
function stateChanged()
{
if (xmlHttp.readyState==4)
{
document.getElementById(field).value=xmlHttp.responseText;
}
}
onload = function()
{
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}