snowboardr
Programmer
I created an image rotation script using AJAX and backend script, and it works PERFECT in IE... but in firefox it doesn't reload the image after the first "rotation"... which normally its the other way around where IE doesn't work and FF works...
I thought it was because of cache, which is maybe still be that... but I have put no cache in my meta tags... etc and in my script as well...
I have also added a random 5 digit number to the end of the image name so it "changes" per say.. but still no luck... my only other option would be to reload the page for firefox users... but that would kind of defeat the purpose of using AJAX.

I thought it was because of cache, which is maybe still be that... but I have put no cache in my meta tags... etc and in my script as well...
I have also added a random 5 digit number to the end of the image name so it "changes" per say.. but still no luck... my only other option would be to reload the page for firefox users... but that would kind of defeat the purpose of using AJAX.
Code:
// Reload users picture back in cell
var LoadPictureHTMLHttp=null;
function loadpicture() {
LoadPictureHTMLHttp = createRequestObject();
var url5="/rotate_image/show_picture.asp";
LoadPictureHTMLHttp.open('GET', url5, true);
LoadPictureHTMLHttp.onreadystatechange = loadPictureDone;
LoadPictureHTMLHttp.send('');
}
function loadPictureDone() {
if (LoadPictureHTMLHttp.readyState == 4) {
document.getElementById('loadimagehere').innerHTML = LoadPictureHTMLHttp.responseText;
}
}
// rotate photo
var doRotateHTMLHttp=null;
function gogoGadgetRotate(strRotate) {
doRotateHTMLHttp = createRequestObject();
var url5="/rotate_image/rotate_picture.asp?rotate=" + strRotate;
doRotateHTMLHttp.open('GET', url5, true);
doRotateHTMLHttp.onreadystatechange = RotatePictureDone;
doRotateHTMLHttp.send('');
}
function RotatePictureDone() {
if (doRotateHTMLHttp.readyState == 4 || doRotateHTMLHttp.readyState=="complete") {
loadpicture();
//attempt at refreshing it after 1.2 seconds doesnt work...
setTimeout('reupdate()',1200);
}
}
function reupdate() {
loadpicture();
}